Пример #1
0
 def test_single_none(self):
     """Test dot join with None."""
     r = tools.join_dot(obj=None)
     assert r == ""
Пример #2
0
 def test_multi(self):
     """Test dot join multi."""
     r = tools.join_dot(obj=["x", "a", "c"])
     assert r == "x.a.c"
Пример #3
0
 def test_empty_list(self):
     """Test dot join single."""
     r = tools.join_dot(obj=[])
     assert r == ""
Пример #4
0
 def test_non_list(self):
     """Test dot join single."""
     r = tools.join_dot(obj="x")
     assert r == "x"
Пример #5
0
 def test_single(self):
     """Test dot join single."""
     r = tools.join_dot(obj=["x"])
     assert r == "x"
Пример #6
0
 def test_multi_with_empty_true(self):
     """Test dot join multi with empty=True."""
     r = tools.join_dot(obj=["x", "", "a", None, "c"], empty=True)
     assert r == "x..a.None.c"
Пример #7
0
 def test_multi_with_empty_false(self):
     """Test dot join multi with empty=False."""
     r = tools.join_dot(obj=["x", "", "a", None, "c", []], empty=False)
     assert r == "x.a.c"