Ejemplo n.º 1
0
class TestBlobsService(TestCase):
    def setUp(self):
        self.service = Blobs(user='******', repo='repo')

    def test_GET(self, reqm):
        reqm.return_value = mock_response()
        self.service.get('abc123')
        self.assertEqual(reqm.call_args[0],
                         ('get', _('repos/octocat/repo/git/blobs/abc123')))

    def test_CREATE(self, reqm):
        reqm.return_value = mock_response('post')
        self.service.create({'content': 'hello, friends', 'encoding':
                             'utf-8'})
        self.assertEqual(reqm.call_args[0],
                         ('post', _('repos/octocat/repo/git/blobs')))
Ejemplo n.º 2
0
 def setUp(self):
     self.service = Blobs(user='******', repo='repo')