added test for utils.make_tuple_fromstr and fixed send_objects to ignore checking nodes for all configs, since that is not always the case
This commit is contained in:
parent
0c840f553d
commit
991abb1895
3 changed files with 27 additions and 5 deletions
22
daemon/tests/test_utils.py
Normal file
22
daemon/tests/test_utils.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
from core.misc import utils
|
||||
|
||||
|
||||
class TestUtils:
|
||||
def test_make_tuple_fromstr(self):
|
||||
# given
|
||||
no_args = "()"
|
||||
one_arg = "('one',)"
|
||||
two_args = "('one', 'two')"
|
||||
unicode_args = u"('one', 'two', 'three')"
|
||||
|
||||
# when
|
||||
no_args = utils.make_tuple_fromstr(no_args, str)
|
||||
one_arg = utils.make_tuple_fromstr(one_arg, str)
|
||||
two_args = utils.make_tuple_fromstr(two_args, str)
|
||||
unicode_args = utils.make_tuple_fromstr(unicode_args, str)
|
||||
|
||||
# then
|
||||
assert no_args == ()
|
||||
assert len(one_arg) == 1
|
||||
assert len(two_args) == 2
|
||||
assert len(unicode_args) == 3
|
Loading…
Add table
Add a link
Reference in a new issue