Beispiel #1
0
 def test_disable_all_accounts(self):
     from security_monkey.scheduler import disable_accounts
     disable_accounts([
         'TEST_ACCOUNT1', 'TEST_ACCOUNT2', 'TEST_ACCOUNT3', 'TEST_ACCOUNT4'
     ])
     accounts = Account.query.all()
     for account in accounts:
         self.assertFalse(account.active)
Beispiel #2
0
 def test_disable_bad_accounts(self):
     from security_monkey.scheduler import disable_accounts
     disable_accounts(['BAD_ACCOUNT'])
     accounts = Account.query.all()
     for account in accounts:
         if account.name == 'TEST_ACCOUNT1' or account.name == 'TEST_ACCOUNT2':
             self.assertTrue(account.active)
         else:
             self.assertFalse(account.active)
 def test_disable_bad_accounts(self):
     from security_monkey.scheduler import disable_accounts
     disable_accounts(['BAD_ACCOUNT'])
     accounts = Account.query.all()
     for account in accounts:
         if account.name == 'TEST_ACCOUNT1' or account.name == 'TEST_ACCOUNT2':
             self.assertTrue(account.active)
         else:
             self.assertFalse(account.active)
 def test_disable_all_accounts(self):
     from security_monkey.scheduler import disable_accounts
     disable_accounts(['TEST_ACCOUNT1', 'TEST_ACCOUNT2', 'TEST_ACCOUNT3', 'TEST_ACCOUNT4'])
     accounts = Account.query.all()
     for account in accounts:
         self.assertFalse(account.active)