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