8000 Remove now redundant old-style tests · christhompson/github3.py@47487d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47487d0

Browse files
committed
Remove now redundant old-style tests
1 parent 5ae9167 commit 47487d0

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

tests/test_repos.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,6 @@ def test_create_pull_from_issue(self):
302302
assert isinstance(pull, github3.pulls.PullRequest)
303303
self.mock_assertions()
304304

305-
def test_create_ref(self):
306-
self.response('ref', 201)
307-
self.post(self.api + 'git/refs')
308-
self.conf = {'data': {'ref': 'refs/heads/master', 'sha': 'fakesha'}}
309-
310-
self.assertRaises(github3.GitHubError, self.repo.create_ref,
311-
'foo', 'bar')
312-
313-
self.login()
314-
assert isinstance(self.repo.create_ref(**self.conf['data']),
315-
github3.git.Reference)
316-
self.mock_assertions()
317-
318305
def test_create_status(self):
319306
self.response('status', 201)
320307
self.post(self.api + 'statuses/fakesha')
@@ -329,36 +316,6 @@ def test_create_status(self):
329316
assert repr(s) > ''
330317
self.mock_assertions()
331318

332-
def test_create_tag(self):
333-
self.response('tag', 201)
334-
self.post(self.api + 'git/tags')
335-
data = {
336-
'tag': '0.3', 'message': 'Fake message', 'object': 'fakesha',
337-
'type': 'commit', 'tagger': {
338-
'name': 'Ian Cordasco', 'date': 'Not a UTC date',
339-
'email': 'graffatcolmingov@gmail.com'
340-
}
341-
}
342-
self.conf = {'data': data.copy()}
343-
data['obj_type'] = data['type']
344-
data['sha'] = data['object']
345-
del(data['type'], data['object'])
346-
347-
self.assertRaises(github3.GitHubError, self.repo.create_tag,
348-
None, None, None, None, None)
349-
350-
self.login()
351-
with mock.patch.object(repos.Repository, 'create_ref'):
352-
tag = self.repo.create_tag(**data)
353-
assert isinstance(tag, github3.git.Tag)
354-
assert repr(tag).startswith('<Tag')
355-
self.mock_assertions()
356-
357-
with mock.patch.object(repos.Repository, 'create_ref') as cr:
358-
self.repo.create_tag('tag', '', 'fakesha', '', '',
359-
lightweight=True)
360-
cr.assert_called_once_with('refs/tags/tag', 'fakesha')
361-
362319
def test_delete(self):
363320
self.response('', 204)
364321
self.delete(self.api[:-1])

0 commit comments

Comments
 (0)
0