diff --git a/tests/adapters/broker/celery_broker/tests.py b/tests/adapters/broker/celery_broker/tests.py index 5024dc9b..553e7ea2 100644 --- a/tests/adapters/broker/celery_broker/tests.py +++ b/tests/adapters/broker/celery_broker/tests.py @@ -35,4 +35,4 @@ def register(self): def test_that_an_event_is_published_to_the_broker(self, mock): Person.add_newcomer({"first_name": "John", "last_name": "Doe", "age": 21}) mock.assert_called_once() - assert type(mock.call_args.args[0]) == dict + assert type(mock.call_args.args[0]) is dict diff --git a/tests/adapters/model/sqlalchemy_model/postgresql/test_array_datatype.py b/tests/adapters/model/sqlalchemy_model/postgresql/test_array_datatype.py index b8ec3604..909edb9b 100644 --- a/tests/adapters/model/sqlalchemy_model/postgresql/test_array_datatype.py +++ b/tests/adapters/model/sqlalchemy_model/postgresql/test_array_datatype.py @@ -36,7 +36,7 @@ def test_array_data_type_association(test_domain): test_domain.register(ArrayUser) model_cls = test_domain.repository_for(ArrayUser)._model - type(model_cls.roles.property.columns[0].type) == sa_types.ARRAY + type(model_cls.roles.property.columns[0].type) is sa_types.ARRAY @pytest.mark.postgresql diff --git a/tests/adapters/model/sqlalchemy_model/postgresql/test_json_datatype.py b/tests/adapters/model/sqlalchemy_model/postgresql/test_json_datatype.py index 20541eda..df2290a9 100644 --- a/tests/adapters/model/sqlalchemy_model/postgresql/test_json_datatype.py +++ b/tests/adapters/model/sqlalchemy_model/postgresql/test_json_datatype.py @@ -19,7 +19,7 @@ def test_json_data_type_association(test_domain): test_domain.register(Event) model_cls = test_domain.repository_for(Event)._model - type(model_cls.payload.property.columns[0].type) == sa_types.JSON + type(model_cls.payload.property.columns[0].type) is sa_types.JSON @pytest.mark.postgresql diff --git a/tests/adapters/model/sqlalchemy_model/sqlite/test_array_datatype.py b/tests/adapters/model/sqlalchemy_model/sqlite/test_array_datatype.py index a6b9c185..33c470a5 100644 --- a/tests/adapters/model/sqlalchemy_model/sqlite/test_array_datatype.py +++ b/tests/adapters/model/sqlalchemy_model/sqlite/test_array_datatype.py @@ -34,7 +34,7 @@ def test_array_data_type_association(test_domain): test_domain.register(ArrayUser) model_cls = test_domain.repository_for(ArrayUser)._model - type(model_cls.roles.property.columns[0].type) == sa_types.ARRAY + type(model_cls.roles.property.columns[0].type) is sa_types.ARRAY @pytest.mark.sqlite diff --git a/tests/adapters/model/sqlalchemy_model/sqlite/test_json_datatype.py b/tests/adapters/model/sqlalchemy_model/sqlite/test_json_datatype.py index 1b4851f8..b7a8acab 100644 --- a/tests/adapters/model/sqlalchemy_model/sqlite/test_json_datatype.py +++ b/tests/adapters/model/sqlalchemy_model/sqlite/test_json_datatype.py @@ -18,7 +18,7 @@ def test_json_data_type_association(test_domain): test_domain.register(Event) model_cls = test_domain.repository_for(Event)._model - type(model_cls.payload.property.columns[0].type) == sa_types.PickleType + type(model_cls.payload.property.columns[0].type) is sa_types.PickleType @pytest.mark.sqlite diff --git a/tests/field/tests.py b/tests/field/tests.py index 60f4bc70..c8164c51 100644 --- a/tests/field/tests.py +++ b/tests/field/tests.py @@ -15,7 +15,7 @@ class DummyStringField(Field): def _cast_to_type(self, value: str): """Value must me a string type""" - if type(value) != str: + if type(value) is not str: self.fail("invalid_type") return value diff --git a/tests/utils/test_util.py b/tests/utils/test_util.py index 7b29c8d6..56856d4c 100644 --- a/tests/utils/test_util.py +++ b/tests/utils/test_util.py @@ -10,4 +10,4 @@ def test_utcnow_func(): result = func() assert result is not None - assert type(result) == datetime.datetime + assert type(result) is datetime.datetime