def testAttachments(self):
     # All TopLevels can have attachments
     # TODO: There's a better test here involving a Document
     attachment = sbol2.Attachment('attachment')
     md = sbol2.ModuleDefinition('md')
     md.attachments = attachment.identity
     self.assertEqual([attachment.identity], md.attachments)
 def test_add_attachment(self):
     doc = sbol2.Document()
     test_attach = sbol2.Attachment("TEST")
     doc.addAttachment(test_attach)
     self.assertEqual(1, len(doc.attachments))
     self.assertTrue(test_attach.compare(doc.attachments[0]))
Example #3
0
 def test_type_uri(self):
     # Test that after construction the attachment has the correct URI.
     # This was a problem until the arguments to the constructor were
     # rearranged.
     test_attach = sbol2.Attachment("TEST")
     self.assertEqual(sbol2.SBOL_ATTACHMENT, test_attach.rdf_type)