Пример #1
0
 def setUp(self):
     db.session.begin(subtransactions=True)
     (account, meters) = test_utils.create_meters()
     self.account = account
     self.meter = meters[0]
     test_utils.add_datasources(account, meters, "test-scraper")
     us = self.meter.utility_service
     us.gen_service_id = datetime.now().strftime("%f")
     db.session.add(us)
     db.session.flush()
Пример #2
0
 def setUp(self):
     (account, meters) = test_utils.create_meters()
     self.account = account
     self.meters = meters
     # create internal user
     self.user = SnapmeterUser(
         email="*****@*****.**" % datetime.now().strftime("%s%f"),
         groups=["groups:superusers"],
     )
     db.session.add(self.user)
     db.session.flush()
 def setUp(self):
     (account, meters) = test_utils.create_meters()
     test_utils.add_datasources(account, meters, "sdge_myaccount")
     self.account_oid = account.oid
     self.meter_ids = [m.oid for m in meters]
Пример #4
0
 def setUp(self):
     (account, meters) = test_utils.create_meters()
     test_utils.add_datasources(account, meters, "austin-energy-interval")
     self.account_oid = account.oid
     self.meter_ids = [m.oid for m in meters]
 def setUp(self):
     (self.account, meters) = test_utils.create_meters()
     self.meter_ids = [m.oid for m in meters]