From 1b8258a52110cd8eac2f2012e99cf6c16153a839 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Wed, 14 Sep 2011 14:50:54 +0200 Subject: [PATCH] Add a test for #23 --- budget/tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/budget/tests.py b/budget/tests.py index db37e46..96ed042 100644 --- a/budget/tests.py +++ b/budget/tests.py @@ -186,6 +186,15 @@ class BudgetTestCase(TestCase): self.assertEqual( len(models.Project.query.get("raclette").active_members), 2) + # adding an user with the same name as another user from a different + # project should not cause any troubles + self.post_project("randomid") + self.login("randomid") + self.app.post("/randomid/members/add", data={'name': 'fred' }) + self.assertEqual( + len(models.Project.query.get("randomid").active_members), 1) + + def test_demo(self): # Test that it is possible to connect automatically by going onto /demo with run.app.test_client() as c: