Esempio n. 1
0
 def test_casting_string_and_dict_will_return_rel_with_properties(self):
     type = "KNOWS"
     properties = {"since": 1999}
     casted = Rel.cast((type, properties))
     assert casted == Rel(type, **properties)
Esempio n. 2
0
 def test_casting_rel_will_return_same(self):
     rel = Rel("KNOWS", since=1999)
     casted = Rel.cast(rel)
     assert casted is rel
Esempio n. 3
0
 def test_casting_string_will_return_rel_with_type(self):
     type = "KNOWS"
     casted = Rel.cast(type)
     assert casted == Rel(type)
Esempio n. 4
0
 def test_casting_none_will_return_none(self):
     casted = Rel.cast(None)
     assert casted is None
Esempio n. 5
0
 def test_casting_string_and_dict_will_return_rel_with_properties(self):
     type = "KNOWS"
     properties = {"since": 1999}
     casted = Rel.cast((type, properties))
     assert casted == Rel(type, **properties)
Esempio n. 6
0
 def test_casting_string_will_return_rel_with_type(self):
     type = "KNOWS"
     casted = Rel.cast(type)
     assert casted == Rel(type)
Esempio n. 7
0
 def test_casting_rel_will_return_same(self):
     rel = Rel("KNOWS", since=1999)
     casted = Rel.cast(rel)
     assert casted is rel
Esempio n. 8
0
 def test_casting_none_will_return_none(self):
     casted = Rel.cast(None)
     assert casted is None