Beispiel #1
0
 def test_remove_tmp(self):
     testItem = Item()
     testItem.createTmpRelations({})
     testItem.tmp_links = ['link1', 'link2']
     testItem.removeTmpRelations()
     with self.assertRaises(AttributeError):
         tmpLinks = testItem.tmp_links
Beispiel #2
0
 def test_create_tmp(self):
     itemData = {
         'links': ['link1', 'link2'],
         'identifiers': ['id1', 'id2', 'id3']
     }
     testItem = Item()
     testItem.createTmpRelations(itemData)
     self.assertEqual(testItem.tmp_identifiers[1], 'id2')
     self.assertEqual(len(testItem.tmp_links), 2)
     self.assertEqual(testItem.links, set())