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