コード例 #1
0
ファイル: test_rel.py プロジェクト: pombredanne/zerograph
 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)
コード例 #2
0
ファイル: test_rel.py プロジェクト: pombredanne/zerograph
 def test_casting_rel_will_return_same(self):
     rel = Rel("KNOWS", since=1999)
     casted = Rel.cast(rel)
     assert casted is rel
コード例 #3
0
ファイル: test_rel.py プロジェクト: pombredanne/zerograph
 def test_casting_string_will_return_rel_with_type(self):
     type = "KNOWS"
     casted = Rel.cast(type)
     assert casted == Rel(type)
コード例 #4
0
ファイル: test_rel.py プロジェクト: pombredanne/zerograph
 def test_casting_none_will_return_none(self):
     casted = Rel.cast(None)
     assert casted is None
コード例 #5
0
ファイル: test_rel.py プロジェクト: nigelsmall/zerograph
 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)
コード例 #6
0
ファイル: test_rel.py プロジェクト: nigelsmall/zerograph
 def test_casting_string_will_return_rel_with_type(self):
     type = "KNOWS"
     casted = Rel.cast(type)
     assert casted == Rel(type)
コード例 #7
0
ファイル: test_rel.py プロジェクト: nigelsmall/zerograph
 def test_casting_rel_will_return_same(self):
     rel = Rel("KNOWS", since=1999)
     casted = Rel.cast(rel)
     assert casted is rel
コード例 #8
0
ファイル: test_rel.py プロジェクト: nigelsmall/zerograph
 def test_casting_none_will_return_none(self):
     casted = Rel.cast(None)
     assert casted is None