예제 #1
0
 def test_shell_account_when_it_doesnt_exists(self, account_mock):
     with patch.object(db, 'session'):
         account = shell_account()
         assert account.name == 'system'
         db.session.add.assert_called_once_with(account)
예제 #2
0
 def test_shell_account_when_it_doesnt_exists(self, account_mock):
     with h.patch.object(db, 'session'):
         account = shell_account()
         assert account.name == 'system'
         db.session.add.assert_called_once_with(account)
예제 #3
0
 def test_shell_account_when_it_exists(self, account_mock):
     assert shell_account() == 'the account'
     Account.by_name.assert_called_once_with('system')
예제 #4
0
 def test_shell_account_when_it_exists(self, account_mock):
     assert shell_account() == 'the account'
     Account.by_name.assert_called_once_with('system')