def setUp(self): self.cwd=FilePath.getcwd() TEST_DATA_DIR.chdir() self.doc=edmx.Document() mdPath=TEST_DATA_DIR.join('sample_server','metadata.xml') with mdPath.open('rb') as f: self.doc.Read(f) self.schema=self.doc.root.DataServices['SampleModel'] self.container=self.doc.root.DataServices["SampleModel.SampleEntities"] self.d=FilePath.mkdtemp('.d','pyslet-test_odata2_sqlds-') self.db=SQLiteEntityContainer(filePath=self.d.join('test.db'),containerDef=self.container)
def setUp(self): self.cwd=FilePath.getcwd() self.dList=[] self.d=FilePath.mkdtemp('.d','pyslet-test_imscpv1p2-') self.d.chdir() FilePath('package').mkdir() FilePath('mpackage').mkdir() mpath=FilePath('mpackage','imsmanifest.xml') f=mpath.open('wb') f.write(EXAMPLE_2) f.close() self.dList.append(self.d)
def setUp(self): self.cwd = FilePath.getcwd() self.dList = [] self.d = FilePath.mkdtemp(".d", "pyslet-test_imscpv1p2-") self.d.chdir() FilePath("package").mkdir() FilePath("mpackage").mkdir() mpath = FilePath("mpackage", "imsmanifest.xml") f = mpath.open("wb") f.write(EXAMPLE_2) f.close() self.dList.append(self.d)
def setUp(self): self.cwd = FilePath.getcwd() self.dList = [] self.d = FilePath.mkdtemp('.d', 'pyslet-test_imscpv1p2-') self.d.chdir() FilePath('package').mkdir() FilePath('mpackage').mkdir() mpath = FilePath('mpackage', 'imsmanifest.xml') f = mpath.open('wb') f.write(EXAMPLE_2) f.close() self.dList.append(self.d)
def setUp(self): # noqa self.cwd = FilePath.getcwd() TEST_DATA_DIR.chdir() self.doc = edmx.Document() md_path = TEST_DATA_DIR.join('sqlds', 'custom.xml') with md_path.open('rb') as f: self.doc.Read(f) self.schema = self.doc.root.DataServices['CustomModel'] self.container = self.doc.root.DataServices[ "CustomModel.FileContainer"] self.d = FilePath.mkdtemp('.d', 'pyslet-test_odata2_sqlds-') self.db = CustomisedContainer(file_path=self.d.join('test.db'), container=self.container)
def setUp(self): # noqa self.cwd = FilePath.getcwd() TEST_DATA_DIR.chdir() self.doc = edmx.Document() md_path = TEST_DATA_DIR.join('sample_server', 'metadata.xml') with md_path.open('rb') as f: self.doc.Read(f) self.schema = self.doc.root.DataServices['SampleModel'] self.container = self.doc.root.DataServices[ "SampleModel.SampleEntities"] self.d = FilePath.mkdtemp('.d', 'pyslet-test_odata2_sqlds-') self.db = SQLiteEntityContainer(file_path=self.d.join('test.db'), container=self.container)
def setUp(self): # noqa self.cwd = FilePath.getcwd() TEST_DATA_DIR.chdir() self.doc = edmx.Document() md_path = TEST_DATA_DIR.join('sqlds', 'custom.xml') with md_path.open('rb') as f: self.doc.read(f) self.schema = self.doc.root.DataServices['CustomModel'] self.container = self.doc.root.DataServices[ "CustomModel.FileContainer"] self.d = FilePath.mkdtemp('.d', 'pyslet-test_odata2_sqlds-') self.db = CustomisedContainer( file_path=self.d.join('test.db'), container=self.container)