コード例 #1
0
 def test_concept_with_value_one(self):
     concept = ConceptPB()
     concept.id = 'some-id'
     concept.name = 'Some Name'
     concept.value = True
     converted = protobuf_to_dict(concept)
     assert converted['value'] == 1.0
コード例 #2
0
 def test_concept_with_value_non_zero(self):
     concept = ConceptPB()
     concept.id = 'some-id'
     concept.name = 'Some Name'
     concept.value = 0.5
     converted = protobuf_to_dict(concept)
     assert converted['value'] == 0.5