Beispiel #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)
Beispiel #2
0
 def test_casting_rel_will_return_same(self):
     rel = Rel("KNOWS", since=1999)
     casted = Rel.cast(rel)
     assert casted is rel
Beispiel #3
0
 def test_casting_string_will_return_rel_with_type(self):
     type = "KNOWS"
     casted = Rel.cast(type)
     assert casted == Rel(type)
Beispiel #4
0
 def test_casting_none_will_return_none(self):
     casted = Rel.cast(None)
     assert casted is None
Beispiel #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)
Beispiel #6
0
 def test_casting_string_will_return_rel_with_type(self):
     type = "KNOWS"
     casted = Rel.cast(type)
     assert casted == Rel(type)
Beispiel #7
0
 def test_casting_rel_will_return_same(self):
     rel = Rel("KNOWS", since=1999)
     casted = Rel.cast(rel)
     assert casted is rel
Beispiel #8
0
 def test_casting_none_will_return_none(self):
     casted = Rel.cast(None)
     assert casted is None