MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testFollowing

Method testFollowing

tests/AuthenticatedUser.py:171–226  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169 )
170
171 def testFollowing(self):
172 nvie = self.g.get_user("nvie")
173 self.assertListKeyEqual(
174 self.user.get_following(),
175 lambda u: u.login,
176 [
177 "schacon",
178 "jamis",
179 "chad",
180 "unclebob",
181 "dabrahams",
182 "jnorthrup",
183 "brugidou",
184 "regisb",
185 "walidk",
186 "tanzilli",
187 "fjardon",
188 "r3c",
189 "sdanzan",
190 "vineus",
191 "cjuniet",
192 "gturri",
193 "ant9000",
194 "asquini",
195 "claudyus",
196 "jardon-u",
197 "s-bernard",
198 "kamaradclimber",
199 "Lyloa",
200 "nvie",
201 ],
202 )
203 self.assertTrue(self.user.has_in_following(nvie))
204 self.user.remove_from_following(nvie)
205 self.assertFalse(self.user.has_in_following(nvie))
206 self.user.add_to_following(nvie)
207 self.assertTrue(self.user.has_in_following(nvie))
208 self.assertListKeyEqual(
209 self.user.get_followers(),
210 lambda u: u.login,
211 [
212 "jnorthrup",
213 "brugidou",
214 "regisb",
215 "walidk",
216 "afzalkhan",
217 "sdanzan",
218 "vineus",
219 "gturri",
220 "fjardon",
221 "cjuniet",
222 "jardon-u",
223 "kamaradclimber",
224 "L42y",
225 ],
226 )
227
228 def testWatching(self):

Callers

nothing calls this directly

Calls 7

get_userMethod · 0.80
assertListKeyEqualMethod · 0.80
remove_from_followingMethod · 0.80
add_to_followingMethod · 0.80
get_followingMethod · 0.45
has_in_followingMethod · 0.45
get_followersMethod · 0.45

Tested by

no test coverage detected