Beispiel #1
0
 def test_can_create_and_delete_account(self):
     Account.objects(name="Los Pollos Hermanos").delete()
     account = Account(name="Los Pollos Hermanos")
     account.save()
     account2 = Account.objects(id=account.id).first()
     assert(account2.name == account.name)
     Account.objects(id=account.id).delete()
 def test_can_create_and_delete_account(self):
     id = ObjectId("TempTempTemp")
     account = Account(id=id, name="Los Pollos Hermanos")
     account.save()
     account2 = Account.objects(id=account.id).first()
     assert (account2.name == account.name)
     Account.objects(id=account.id).delete()
Beispiel #3
0
 def get_test_account(self):
     account = None
     try:
         account_name = self.test_data["TEST_ACCOUNT_NAME"]
         account = Account.objects(name=account_name).first()
         if account is None:
             account = Account(name=account_name, id=self.test_data["TEST_ACCOUNT_ID"] )
             account.save()
     except:
         pass
     return account