Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 def test_non_model_classes(self):
     models = loads(NON_MODEL_CLASS)
     self.assertNotIn("FooBar", models)
Exemplo n.º 3
0
 def test_models(self):
     models = loads(EMPTY_MODELS)
     self.assertIn("Foo", models)
     self.assertIn("Bar", models)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 def test_non_model_classes(self):
     models = loads(NON_MODEL_CLASS)
     self.assertNotIn("FooBar", models)
Exemplo n.º 6
0
 def test_models(self):
     models = loads(EMPTY_MODELS)
     self.assertIn("Foo", models)
     self.assertIn("Bar", models)