diff --git a/HISTORY.rst b/HISTORY.rst index 1e146e4..35f5aa9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.2.1 (2017-4-26) +----------------- + +* Fix bug related to default urlconf value. + 0.2.0 (2017-04-26) ~~~~~~~~~~~~~~~~~~ diff --git a/subui/__init__.py b/subui/__init__.py index adfd91c..1ebcdde 100644 --- a/subui/__init__.py +++ b/subui/__init__.py @@ -218,5 +218,5 @@ def test_login_and_edit(self): __author__ = 'Miroslav Shubernetskiy' -__version__ = '0.2.0' +__version__ = '0.2.1' __description__ = 'Framework to make workflow server integration test suites' diff --git a/subui/step.py b/subui/step.py index a8b95bc..4bbfa6e 100644 --- a/subui/step.py +++ b/subui/step.py @@ -156,11 +156,11 @@ def get_urlconf(self): Get ``urlconf`` which will be used to compute the URL using ``reverse`` By default this returns :py:attr:`urlconf`, if defined, - else empty string + else None :rtype: str """ - return self.urlconf or '' + return self.urlconf or None def get_override_settings(self): """ diff --git a/tests/test_step.py b/tests/test_step.py index 7c1bb55..2bb1baf 100644 --- a/tests/test_step.py +++ b/tests/test_step.py @@ -98,7 +98,7 @@ def test_get_urlconf(self): Test that get_urlconf returns urlconf if defined """ step = TestStep() - self.assertEqual(step.get_urlconf(), '') + self.assertIsNone(step.get_urlconf()) step.urlconf = 'services.urls' self.assertEqual(step.get_urlconf(), 'services.urls') @@ -140,7 +140,7 @@ def test_get_url(self, mock_get_url_args.assert_called_once_with(step) mock_get_url_kwargs.assert_called_once_with(step) mock_reverse.assert_called_once_with( - 'url-name', args=tuple(), urlconf='', kwargs={}) + 'url-name', args=tuple(), urlconf=None, kwargs={}) def test_get_request_data(self): """