def test_property_is_factory(self): self.assertTrue(AttrFactory.any_attribute().is_factory) element = AttrFactory.element() self.assertFalse(element.is_factory) element.restrictions.max_occurs = 2 self.assertTrue(element.is_factory)
def test_field_type_with_any_attribute(self): attr = AttrFactory.any_attribute() self.assertEqual("Dict", self.filters.field_type(attr, ["a", "b"]))
def test_property_is_attribute(self): self.assertTrue(AttrFactory.attribute().is_attribute) self.assertTrue(AttrFactory.any_attribute().is_attribute) self.assertFalse(AttrFactory.element().is_attribute)
def test_field_default_value_with_any_attribute(self): attr = AttrFactory.any_attribute() self.assertEqual("dict", self.filters.field_default_value(attr))