def test_should_not_delete_given_LUHNP(self): self.login_user(self.normal_user) with self.client as client: client.get(url_for('expense.delete', id=self.expense.id)) self.assertTrue(Expense.get(self.expense.id))
def test_should_return_expense_given_valid_id(self): expense = Expense.get(self.expense.id) self.assertEqual(expense, self.expense)
def test_should_delete_expense_given_LUHP(self): self.login_user(self.dev_user) with self.client as client: client.get(url_for('expense.delete', id=self.expense.id)) self.assertFalse(Expense.get(self.expense.id))