def test_append_replace_existed(self):
     field1 = self.create_attr("arg1", "value1")
     fields = FactoryAttributesCollection([field1])
     field2 = self.create_attr("arg1", "value1_new")
     fields.append(field2)
     expected = FactoryAttributesCollection([field2])
     self.assertEqual(expected, fields)
 def test_append_new(self):
     field1 = self.create_attr("arg1", "value1")
     fields = FactoryAttributesCollection([field1])
     field2 = self.create_attr("arg2", "value2")
     fields.append(field2)
     expected_fields = [field1, field2]
     self.assertEqual(expected_fields, fields)