Skip to content

Commit

Permalink
Merge pull request #3 from milin/master
Browse files Browse the repository at this point in the history
set urlconf default return type as none
  • Loading branch information
miki725 authored Apr 26, 2017
2 parents d64f947 + 353192f commit 647c72a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
-------

0.2.1 (2017-4-26)
-----------------

* Fix bug related to default urlconf value.

0.2.0 (2017-04-26)
~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion subui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions subui/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 647c72a

Please sign in to comment.