示例#1
0
 def test_has_false(self):
     assert shackles.has(obj, 'e.b') == False
示例#2
0
 def test_has_list(self):
     assert shackles.has(obj, ['a','b']) == True
     assert shackles.has(obj, ['a','b','name']) == True
示例#3
0
 def test_has_tuple(self):
     assert shackles.has(obj, ('a','b')) == True
     assert shackles.has(obj, ('a','b','name')) == True
示例#4
0
 def test_has_str(self):
     assert shackles.has(obj, 'a.b') == True
     assert shackles.has(obj, 'a.b.name') == True
示例#5
0
 def test_has_false(self):
     assert shackles.has(self.obj, 'e.b') == False
示例#6
0
 def test_has_tuple(self):
     assert shackles.has(self.obj, ('a', 'b')) == True
     assert shackles.has(self.obj, ('a', 'b', 'name')) == True
示例#7
0
 def test_has_list(self):
     assert shackles.has(self.obj, ['a', 'b']) == True
     assert shackles.has(self.obj, ['a', 'b', 'name']) == True
示例#8
0
 def test_has_str(self):
     assert shackles.has(self.obj, 'a.b') == True
     assert shackles.has(self.obj, 'a.b.name') == True