@@ -21,8 +21,8 @@ def __init__(self, username=""):
2121
2222@pytest .mark .parametrize (
2323 (
24- "testName, userIsInDefaultAccessGroup ,"
25- " groupCount "
24+ "_test_name, user_is_in_default_access_group ,"
25+ " group_count "
2626 ),
2727 [
2828 # user is not part of default group and has respective count of git repo,
@@ -31,7 +31,8 @@ def __init__(self, username=""):
3131 ("UserInDefaultGroup" , False , 40 ),
3232 ],
3333)
34- def test_getDashboardData (monkeypatch , testName , userIsInDefaultAccessGroup , groupCount ): # noqa: C901
34+ def test_get_dashboard_data (monkeypatch , _test_name , user_is_in_default_access_group , group_count ):
35+ """ method to test get_dashboard_data """
3536 class MockUserModelobj :
3637 """ mocking method UserModelobj """
3738 def __init__ (self , user = "" , gitusername = "" , name = "" ):
@@ -78,7 +79,7 @@ def filter(self, user="", status="", access__access_tag=""):
7879 if access__access_tag == "ssh" :
7980 return []
8081 group = []
81- for i in range (groupCount ):
82+ for i in range (group_count ):
8283 group .append (i )
8384 return group
8485
@@ -116,12 +117,12 @@ def save(self):
116117 return ""
117118
118119 def __str__ (self ):
119- if userIsInDefaultAccessGroup :
120+ if user_is_in_default_access_group :
120121 return DEFAULT_ACCESS_GROUP
121122 return ""
122123
123124 def __len__ (self ):
124- return groupCount
125+ return group_count
125126
126127 class MockThread :
127128 """ class for mocking Thread """
@@ -146,4 +147,4 @@ def mock_thread(*_, **__):
146147 request = MockRequest (username = "username1" )
147148 context = views_helper .get_dashboard_data (request )
148149 assert context ["regions" ] == ["eu-central-1" ]
149- assert context ["groupCount" ] == groupCount
150+ assert context ["groupCount" ] == group_count
0 commit comments