Skip to content

Commit

Permalink
- add todo for test the not existing method get_relation see
Browse files Browse the repository at this point in the history
(#45)
  • Loading branch information
B-Stefan committed Nov 16, 2016
1 parent 45116fc commit 6dfb685
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions provdbconnector/tests/test_prov_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from uuid import UUID

import pkg_resources
from prov.model import ProvDocument, ProvAgent, ProvEntity, ProvActivity, QualifiedName, ProvRelation
from prov.model import ProvDocument, ProvAgent, ProvEntity, ProvActivity, QualifiedName, ProvRelation, ProvRecord

from provdbconnector.tests import examples as examples
from provdbconnector import ProvDb
Expand Down Expand Up @@ -443,9 +443,10 @@ def test_save_record(self):

#Save relation
self.provapi.save_record(relation)
db_relation = self.provapi.get_relation(relation.identifier)

self.assertEqual(db_element, element)
# @todo discuss if it a get_relation method is useful, see https://github.com/DLR-SC/prov-db-connector/issues/45
# db_relation = self.provapi.get_relation(relation.identifier)
# self.assertEqual(db_element, element)

def test_save_record_invalid(self):
with self.assertRaises(InvalidArgumentTypeException):
Expand All @@ -454,6 +455,12 @@ def test_save_record_invalid(self):
with self.assertRaises(InvalidArgumentTypeException):
self.provapi.save_record(examples.primer_example())

class InvalidProvRecordExtend(ProvRecord):
pass

with self.assertRaises(InvalidArgumentTypeException):
self.provapi.save_record(InvalidProvRecordExtend())

def test_save_element(self):
"""
Try to save a single record without document_di
Expand Down

0 comments on commit 6dfb685

Please sign in to comment.