コード例 #1
0
 def test_get_factory(self):
     factory = get_factory("company")
     self.assertEquals(self.company_collection, factory.collection)
コード例 #2
0
ファイル: helpers.py プロジェクト: stas/monufacture
 def build(*args):
     return {
         "$id": monufacture.create(factory, document, **overrides)["_id"],
         "$ref": monufacture.get_factory(factory).collection.name
     }
コード例 #3
0
 def build(*args):
     collection = monufacture.get_factory(factory).collection.name
     _id = monufacture.create(factory, document, **overrides)["_id"]
     return DBRef(collection, _id)
コード例 #4
0
ファイル: module_tests.py プロジェクト: vantran/monufacture
 def test_get_factory(self):
     factory = get_factory("company")
     self.assertEquals(self.company_collection, factory.collection)
コード例 #5
0
ファイル: helpers.py プロジェクト: gamechanger/monufacture
 def build(*args):
     collection = monufacture.get_factory(factory).collection.name
     _id = monufacture.create(factory, document, **overrides)["_id"]
     return DBRef(collection, _id)