@@ -87,51 +87,3 @@ def test_search_by_three_terms(self):
8787 self .assertEqual (response .status_code , 200 )
8888 self .assertTrue (len (data ["results" ]) == 2 )
8989
90- def test_search_by_three_terms_invalid_service (self ):
91- self .client .force_login (self .user )
92- response = self .client .get (
93- "/admin-repository-autocomplete/" , {"q" : "geehub/user1/repo" }
94- )
95- json_string = response ._container [0 ].decode ("utf-8" )
96- data = loads (json_string )
97-
98- self .assertEqual (response .status_code , 200 )
99- self .assertTrue (len (data ["results" ]) == 0 )
100-
101- def test_search_by_two_terms_service (self ):
102- self .client .force_login (self .user )
103- response = self .client .get (
104- "/admin-repository-autocomplete/" , {"q" : "github/user1" }
105- )
106- json_string = response ._container [0 ].decode ("utf-8" )
107- data = loads (json_string )
108-
109- self .assertEqual (response .status_code , 200 )
110- self .assertTrue (len (data ["results" ]) == 2 )
111-
112- def test_search_by_two_terms_owner (self ):
113- self .client .force_login (self .user )
114- response = self .client .get ("/admin-repository-autocomplete/" , {"q" : "user2/re" })
115- json_string = response ._container [0 ].decode ("utf-8" )
116- data = loads (json_string )
117-
118- self .assertEqual (response .status_code , 200 )
119- self .assertTrue (len (data ["results" ]) == 1 )
120-
121- def test_search_by_one_term_repo (self ):
122- self .client .force_login (self .user )
123- response = self .client .get ("/admin-repository-autocomplete/" , {"q" : "repo4" })
124- json_string = response ._container [0 ].decode ("utf-8" )
125- data = loads (json_string )
126-
127- self .assertEqual (response .status_code , 200 )
128- self .assertTrue (len (data ["results" ]) == 1 )
129-
130- def test_search_by_one_term_service (self ):
131- self .client .force_login (self .user )
132- response = self .client .get ("/admin-repository-autocomplete/" , {"q" : "github" })
133- json_string = response ._container [0 ].decode ("utf-8" )
134- data = loads (json_string )
135-
136- self .assertEqual (response .status_code , 200 )
137- self .assertTrue (len (data ["results" ]) == 3 )
0 commit comments