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:
Blake J. Harnden 2018-08-17 08:25:57 -07:00
parent 0c840f553d
commit 991abb1895
3 changed files with 27 additions and 5 deletions

View 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