def testRemoveSystematicEntryFromDocumentLocation(self): document = Document(56) document.standort = "1.2.III-4" systematic_identifier = SystematicIdentifier("1.2", 3, 4) systematic_point = QualifiedSystematicPoint( SystematicPoint(systematic_identifier, "Description"), True) self.service.remove_systematic_entry_from_document( document, systematic_point) self.assertEqual(document.standort, None) self.references_dao.set_signature_for_document_id.assert_called_with( 56, None)
def testRemoveSystematicEntryFromDocumentRelations(self): document = Document(56) document.standort = "1.2.III-4" systematic_identifier = SystematicIdentifier("1.2", 3, 4) systematic_point = SystematicPoint(systematic_identifier, "Description") qualified_systematic_node = QualifiedSystematicPoint( systematic_point, False) self.service.remove_systematic_entry_from_document( document, qualified_systematic_node) self.references_dao.remove_systematik_document_relation( 56, systematic_identifier)
def testAddSystematicEntryToDocumentWithLocation(self): # Setup document = Document(56) document.standort = "1.2.III-4" systematic_identifier = SystematicIdentifier("5.6", 7, 8) systematic_node = SystematicPoint(systematic_identifier, "Description") # Execution self.service.add_systematic_entry_to_document(document, systematic_node) # Assertion self.assertEqual(document.standort, "1.2.III-4") self.references_dao.add_systematik_document_relation.assert_called_with( systematic_identifier, 56)