Esempio n. 1
0
 def test_library_or_resource_changed_should_return_true_when_library_changed(
         self):
     collection2 = copy.deepcopy(EXPECTED_COLLECTION)
     collection2.version = "1.2.4"
     result = KeywordsImporter._library_or_resource_changed(
         EXPECTED_COLLECTION_WITH_KW_1, EXISTING_COLLECTION_2)
     self.assertTrue(result)
Esempio n. 2
0
 def test_library_or_resource_changed_should_return_false_when_library_unchanged(
     self
 ):
     result = KeywordsImporter._library_or_resource_changed(
         EXPECTED_COLLECTION_WITH_KW_1, EXISTING_COLLECTION
     )
     self.assertFalse(result)
Esempio n. 3
0
 def test_library_or_resource_changed_should_return_true_when_resource_changed(
         self):
     EXPECTED_COLLECTION.type = "resource"
     EXISTING_COLLECTION.type = "resource"
     EXISTING_COLLECTION.doc = "abc"
     result = KeywordsImporter._library_or_resource_changed(
         EXPECTED_COLLECTION_WITH_KW_1, EXISTING_COLLECTION)
     self.assertTrue(result)
Esempio n. 4
0
 def test_library_or_resource_changed_should_return_false_when_resource_unchanged(
         self):
     expected_collection = copy.deepcopy(EXPECTED_COLLECTION)
     existing_collection = copy.deepcopy(EXISTING_COLLECTION)
     expected_collection.type = "resource"
     existing_collection.type = "resource"
     result = KeywordsImporter._library_or_resource_changed(
         EXPECTED_COLLECTION_WITH_KW_1, EXISTING_COLLECTION)
     self.assertFalse(result)