Exemplo n.º 1
0
    def testDeleteCubeSet(self):
        cubeSetName = 'test-' + str(uuid.uuid4())
        csvFileName =  cubeSetName + '.csv'
        shutil.copyfile('testdata.csv', cubeSetName + '.csv')
        cs = CubeSetService('testdb')
        cs.createCubeSet("testOwner", cubeSetName, cubeSetName, csvFileName, None, None)
        cs.deleteCubeSet(cubeSetName)
        cubeSet = cs.getCubeSet(cubeSetName)
        self.assertTrue(cubeSet == None)

        os.remove(csvFileName)
Exemplo n.º 2
0
    def testDeleteCubeSet2(self):
        cubeSetName = 'test-' + str(uuid.uuid4())
        csvFileName =  cubeSetName + '.csv'
        shutil.copyfile('testdata.csv', cubeSetName + '.csv')
        with open('test_binnings.json') as binnings_file:
            binnings = json.load(binnings_file)
        with open('test_agg.json') as agg_file:
            aggs = json.load(agg_file)

        cs = CubeSetService('testdb')
        cs.createCubeSet("testOwner", cubeSetName, cubeSetName, csvFileName, binnings, aggs)
        cs.deleteCubeSet(cubeSetName)
        cubeSet = cs.getCubeSet(cubeSetName)
        self.assertTrue(cubeSet == None)

        os.remove(csvFileName)