Browse Source

renaming of tests in user_api

Guénaël Muller 6 years ago
parent
commit
60171c6620
1 changed files with 4 additions and 5 deletions
  1. 4 5
      tracim/tests/library/test_user_api.py

+ 4 - 5
tracim/tests/library/test_user_api.py View File

@@ -5,7 +5,6 @@ from sqlalchemy.orm.exc import NoResultFound
5 5
 import transaction
6 6
 
7 7
 from tracim.lib.core.user import UserApi
8
-from tracim.models import User
9 8
 from tracim.tests import DefaultTest
10 9
 from tracim.tests import eq_
11 10
 
@@ -49,7 +48,7 @@ class TestUserApi(DefaultTest):
49 48
         eq_(True, api.user_with_email_exists('bibi@bibi'))
50 49
         eq_(False, api.user_with_email_exists('unknown'))
51 50
 
52
-    def test_get_one_by_email(self):
51
+    def test_unit__get_one_by_email__ok__nominal_case(self):
53 52
         api = UserApi(
54 53
             current_user=None,
55 54
             session=self.session,
@@ -63,7 +62,7 @@ class TestUserApi(DefaultTest):
63 62
 
64 63
         eq_(uid, api.get_one_by_email('bibi@bibi').user_id)
65 64
 
66
-    def test_get_one_by_email_exception(self):
65
+    def test_unit__get_one_by_email__ok__user_not_found(self):
67 66
         api = UserApi(
68 67
             current_user=None,
69 68
             session=self.session,
@@ -72,7 +71,7 @@ class TestUserApi(DefaultTest):
72 71
         with pytest.raises(NoResultFound):
73 72
             api.get_one_by_email('unknown')
74 73
 
75
-    def test_get_all(self):
74
+    def test_unit__get_all__ok__nominal_case(self):
76 75
         api = UserApi(
77 76
             current_user=None,
78 77
             session=self.session,
@@ -84,7 +83,7 @@ class TestUserApi(DefaultTest):
84 83
         # u1 + Admin user from BaseFixture
85 84
         assert 2 == len(users)
86 85
 
87
-    def test_get_one(self):
86
+    def test_unit__get_one__ok__nominal_case(self):
88 87
         api = UserApi(
89 88
             current_user=None,
90 89
             session=self.session,