Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitadaa2f9

Browse files
committed
Remove legacy search tests
1 parenta0030c3 commitadaa2f9

File tree

2 files changed

+0
-108
lines changed

2 files changed

+0
-108
lines changed

‎tests/test_api.py‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -131,26 +131,6 @@ def test_repository(self):
131131
github3.repository(*args)
132132
self.gh.repository.assert_called_with(*args)
133133

134-
deftest_search_issues(self):
135-
args= ('owner','repo','state','keyword')
136-
github3.search_issues(*args)
137-
self.gh.search_issues.assert_called_with(*args)
138-
139-
deftest_search_repos(self):
140-
args= ('keyword',)
141-
github3.search_repos(*args)
142-
self.gh.search_repos.assert_called_with(*args)
143-
144-
deftest_search_users(self):
145-
args= ('login',)
146-
github3.search_users(*args)
147-
self.gh.search_users.assert_called_with(*args)
148-
149-
deftest_search_email(self):
150-
args= ('email',)
151-
github3.search_email(*args)
152-
self.gh.search_email.assert_called_with(*args)
153-
154134
deftest_user(self):
155135
github3.user('login')
156136
self.gh.user.assert_called_with('login')

‎tests/test_github.py‎

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -671,94 +671,6 @@ def test_repository(self):
671671
assertisinstance(repo,github3.repos.Repository)
672672
self.mock_assertions()
673673

674-
deftest_search_issues(self):
675-
self.response('legacy_issue')
676-
self.get('https://api.github.com/legacy/{0}/{1}/{2}/{3}/{4}/'
677-
'{5}'.format('issues','search','sigmavirus24',
678-
'github3.py','closed','requests'))
679-
self.conf.update({'params': {}})
680-
issues=self.g.search_issues('sigmavirus24','github3.py','closed',
681-
'requests')
682-
683-
assertisinstance(issues[0],github3.legacy.LegacyIssue)
684-
assertrepr(issues[0]).startswith('<Legacy Issue')
685-
self.mock_assertions()
686-
687-
self.conf.update({'params': {'start_page':2}})
688-
issues=self.g.search_issues('sigmavirus24','github3.py','closed',
689-
'requests',2)
690-
self.mock_assertions()
691-
692-
deftest_search_repos(self):
693-
self.response('legacy_repo')
694-
self.get('https://api.github.com/{0}/{1}/{2}/{3}'.format(
695-
'legacy','repos','search','github3.py'))
696-
self.conf.update(params={'start_page':None,'language':None})
697-
repos=self.g.search_repos('github3.py')
698-
assertisinstance(repos[0],github3.legacy.LegacyRepo)
699-
assertrepr(repos[0]).startswith('<Legacy Repo')
700-
assertrepos[0].is_private()==repos[0].private
701-
self.mock_assertions()
702-
703-
repos=self.g.search_repos('github3.py',sort='Foobar')
704-
self.mock_assertions()
705-
706-
repos=self.g.search_repos('github3.py',order='Foobar')
707-
self.mock_assertions()
708-
709-
self.conf.update(params={'language':'python','start_page':10})
710-
repos=self.g.search_repos('github3.py','python',10)
711-
self.mock_assertions()
712-
713-
self.conf.update(params={'sort':'stars','start_page':None,
714-
'language':None})
715-
repos=self.g.search_repos('github3.py',sort='stars')
716-
self.mock_assertions()
717-
718-
repos=self.g.search_repos('github3.py',sort='stars',
719-
order='Foobar')
720-
self.mock_assertions()
721-
722-
self.conf.update(params={'order':'asc','start_page':None,
723-
'language':None})
724-
repos=self.g.search_repos('github3.py',order='asc')
725-
726-
deftest_search_users(self):
727-
self.response('legacy_user')
728-
self.get('https://api.github.com/{0}/{1}/{2}/{3}'.format(
729-
'legacy','user','search','sigmavirus24'))
730-
self.conf.update({'params': {}})
731-
users=self.g.search_users('sigmavirus24')
732-
assertisinstance(users[0],github3.legacy.LegacyUser)
733-
assertrepr(users[0]).startswith('<Legacy User')
734-
self.mock_assertions()
735-
736-
users=self.g.search_users('sigmavirus24',sort='Foobar')
737-
self.mock_assertions()
738-
739-
users=self.g.search_users('sigmavirus24',order='Foobar')
740-
self.mock_assertions()
741-
742-
self.conf.update({'params': {'start_page':2}})
743-
self.g.search_users('sigmavirus24',2)
744-
self.mock_assertions()
745-
746-
self.conf.update({'params': {'sort':'joined'}})
747-
self.g.search_users('sigmavirus24',sort='joined',order='Foobar')
748-
self.mock_assertions()
749-
750-
self.conf.update({'params': {'order':'asc'}})
751-
self.g.search_users('sigmavirus24',order='asc')
752-
self.mock_assertions()
753-
754-
deftest_search_email(self):
755-
self.response('legacy_email')
756-
self.get('https://api.github.com/{0}/{1}/{2}/{3}'.format(
757-
'legacy','user','email','graffatcolmingov@gmail.com'))
758-
user=self.g.search_email('graffatcolmingov@gmail.com')
759-
assertisinstance(user,github3.legacy.LegacyUser)
760-
self.mock_assertions()
761-
762674
deftest_set_client_id(self):
763675
auth= ('idXXXXXXXXXXXX','secretXXXXXXXXXXXXXXXX')
764676
self.g.set_client_id(*auth)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp