Ejemplo n.º 1
0
 def test_contains_ignores_similar_items(self):
     product_dict = ProductMapping()
     resource = make_boot_resource()
     subarch = factory.make_name("subarch")
     product_dict.add(resource.copy(), subarch)
     resource["product_name"] = factory.make_name("other")
     self.assertFalse(product_dict.contains(resource))
Ejemplo n.º 2
0
 def test_contains_ignores_extraneous_keys(self):
     product_dict = ProductMapping()
     resource = make_boot_resource()
     subarch = factory.make_name("subarch")
     product_dict.add(resource.copy(), subarch)
     resource["other_item"] = factory.make_name("other")
     self.assertTrue(product_dict.contains(resource))
Ejemplo n.º 3
0
 def test_contains_returns_true_for_stored_item(self):
     product_dict = ProductMapping()
     resource = make_boot_resource()
     subarch = factory.make_name("subarch")
     product_dict.add(resource, subarch)
     self.assertTrue(product_dict.contains(resource))