From 3e73555869cde31e6c640be26751b7f3f99d4b1a Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 8 Nov 2018 22:55:01 +0200 Subject: [PATCH] Remove assertEquals from tests --- docs/main/changelog.rst | 1 + tests/unit/providers/test_injections_py2_py3.py | 6 +++--- tests/unit/test_common_py2_py3.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 99474c34..715fae6c 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -12,6 +12,7 @@ Development version - Fix bug `#208 `_: version ``3.14.0`` hasn't worked on Python 3.5.2 (thanks to `Jeroen Entjes `_). +- Remove deprecated ``assertEquals`` from tests. 3.14.0 ------ diff --git a/tests/unit/providers/test_injections_py2_py3.py b/tests/unit/providers/test_injections_py2_py3.py index c1514abe..dacd4714 100644 --- a/tests/unit/providers/test_injections_py2_py3.py +++ b/tests/unit/providers/test_injections_py2_py3.py @@ -13,7 +13,7 @@ class PositionalInjectionTests(unittest.TestCase): def test_get_value_with_not_provider(self): injection = providers.PositionalInjection(123) - self.assertEquals(injection.get_value(), 123) + self.assertEqual(injection.get_value(), 123) def test_get_value_with_factory(self): injection = providers.PositionalInjection(providers.Factory(object)) @@ -61,11 +61,11 @@ class NamedInjectionTests(unittest.TestCase): def test_get_name(self): injection = providers.NamedInjection('name', 123) - self.assertEquals(injection.get_name(), 'name') + self.assertEqual(injection.get_name(), 'name') def test_get_value_with_not_provider(self): injection = providers.NamedInjection('name', 123) - self.assertEquals(injection.get_value(), 123) + self.assertEqual(injection.get_value(), 123) def test_get_value_with_factory(self): injection = providers.NamedInjection('name', diff --git a/tests/unit/test_common_py2_py3.py b/tests/unit/test_common_py2_py3.py index 3947da4c..1a2d1f73 100644 --- a/tests/unit/test_common_py2_py3.py +++ b/tests/unit/test_common_py2_py3.py @@ -8,4 +8,4 @@ from dependency_injector import __version__ class VersionTest(unittest.TestCase): def test_version_follows_semantic_versioning(self): - self.assertEquals(len(__version__.split('.')), 3) + self.assertEqual(len(__version__.split('.')), 3)