def test_model_fields(self): model = loads(MODEL_WITH_FIELDS).get("Foo") self.assertEqual(len(model), 2) field_names = map(operator.itemgetter("name"), model) self.assertIn("foo", field_names) self.assertIn("bar", field_names)
def test_non_model_classes(self): models = loads(NON_MODEL_CLASS) self.assertNotIn("FooBar", models)
def test_models(self): models = loads(EMPTY_MODELS) self.assertIn("Foo", models) self.assertIn("Bar", models)