Esempio n. 1
0
 def setUp(self):
     super(TestDatasetApiController, self).setUp()
     self.cra = load_fixture('cra')
     self.user = make_account('test')
     self.auth_qs = {'api_key': self.user.api_key}
     self.cra.managers.append(self.user)
     db.session.commit()
Esempio n. 2
0
 def test_dashboard(self):
     test = make_account('test')
     cra = load_fixture('cra', manager=test)
     response = self.client.get(url_for('account.dashboard'),
                                query_string={'api_key': test.api_key})
     assert '200' in response.status, response.status
     assert unicode(cra.label) in response.data.decode('utf-8'), [response.data]
Esempio n. 3
0
 def setUp(self):
     super(TestSourceApiController, self).setUp()
     self.cra = load_fixture('cra')
     self.user = make_account('test')
     self.auth_qs = {'api_key': self.user.api_key}
     self.cra.managers.append(self.user)
     self.cra_url = csvimport_fixture_path('../data', 'cra.csv')
     db.session.commit()
Esempio n. 4
0
 def setUp(self):
     super(TestSlicerApiController, self).setUp()
     self.cra = load_fixture("cra")
     self.user = make_account("test")
     self.auth_qs = {"api_key": self.user.api_key}
     self.cra.managers.append(self.user)
     self.cra_url = csvimport_fixture_path("../data", "cra.csv")
     db.session.commit()
Esempio n. 5
0
 def setUp(self):
     super(TestDimension, self).setUp()
     self.engine = db.engine
     self.meta = db.metadata
     self.meta.bind = self.engine
     self.ds = load_fixture('cra')
     self.dims = list(self.ds.model.dimensions)
     print self.dims
     for d in self.dims:
         if d.name == 'from':
             self.entity = d
Esempio n. 6
0
 def setUp(self):
     super(TestRunApiController, self).setUp()
     self.cra = load_fixture('cra')
     self.user = make_account('test')
     self.auth_qs = {'api_key': self.user.api_key}
     self.cra.managers.append(self.user)
     db.session.commit()
     url = url_for('sources_api.upload', dataset=self.cra.name)
     fh = data_fixture('cra')
     self.source = self.client.post(url, data={
         'file': (fh, 'cra.csv')
     }, query_string=self.auth_qs).json
Esempio n. 7
0
 def setUp(self):
     super(TestHomeController, self).setUp()
     self.dataset = load_fixture('cra')
     self.user = make_account('test')
Esempio n. 8
0
 def setUp(self):
     super(TestDatasetLoad, self).setUp()
     self.ds = load_fixture('simple')
     self.engine = db.engine
Esempio n. 9
0
 def setUp(self):
     super(TestDataset, self).setUp()
     self.ds = load_fixture('simple')
Esempio n. 10
0
 def setUp(self):
     super(TestSlicerController, self).setUp()
     self.dataset = load_fixture('cra')
     self.user = make_account('test')