Ejemplo n.º 1
0
 def test_single_none(self):
     """Test dot join with None."""
     r = tools.join_dot(obj=None)
     assert r == ""
Ejemplo n.º 2
0
 def test_multi(self):
     """Test dot join multi."""
     r = tools.join_dot(obj=["x", "a", "c"])
     assert r == "x.a.c"
Ejemplo n.º 3
0
 def test_empty_list(self):
     """Test dot join single."""
     r = tools.join_dot(obj=[])
     assert r == ""
Ejemplo n.º 4
0
 def test_non_list(self):
     """Test dot join single."""
     r = tools.join_dot(obj="x")
     assert r == "x"
Ejemplo n.º 5
0
 def test_single(self):
     """Test dot join single."""
     r = tools.join_dot(obj=["x"])
     assert r == "x"
Ejemplo n.º 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"
Ejemplo n.º 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"