Esempio n. 1
0
 def test_get_factory(self):
     factory = get_factory("company")
     self.assertEquals(self.company_collection, factory.collection)
Esempio n. 2
0
 def build(*args):
     return {
         "$id": monufacture.create(factory, document, **overrides)["_id"],
         "$ref": monufacture.get_factory(factory).collection.name
     }
Esempio n. 3
0
 def build(*args):
     collection = monufacture.get_factory(factory).collection.name
     _id = monufacture.create(factory, document, **overrides)["_id"]
     return DBRef(collection, _id)
Esempio n. 4
0
 def test_get_factory(self):
     factory = get_factory("company")
     self.assertEquals(self.company_collection, factory.collection)
Esempio n. 5
0
 def build(*args):
     collection = monufacture.get_factory(factory).collection.name
     _id = monufacture.create(factory, document, **overrides)["_id"]
     return DBRef(collection, _id)