@@ -302,19 +302,6 @@ def test_create_pull_from_issue(self):
302
302
assert isinstance (pull , github3 .pulls .PullRequest )
303
303
self .mock_assertions ()
304
304
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
-
318
305
def test_create_status (self ):
319
306
self .response ('status' , 201 )
320
307
self .post (self .api + 'statuses/fakesha' )
@@ -329,36 +316,6 @@ def test_create_status(self):
329
316
assert repr (s ) > ''
330
317
self .mock_assertions ()
331
318
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
-
362
319
def test_delete (self ):
363
320
self .response ('' , 204 )
364
321
self .delete (self .api [:- 1 ])
0 commit comments