Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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')
Exemplo n.º 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')