Ejemplo n.º 1
0
class TestForksService(TestCase):
    def setUp(self):
        self.fs = Forks(user='******', repo='re_oct')

    def test_LIST(self, request_method):
        request_method.return_value = mock_response_result()
        self.fs.list().all()
        self.assertEqual(request_method.call_args[0],
                         ('get', _('repos/oct/re_oct/forks')))

    def test_CREATE(self, request_method):
        request_method.return_value = mock_response('post')
        self.fs.create()
        self.assertEqual(request_method.call_args[0],
                         ('post', _('repos/oct/re_oct/forks')))
Ejemplo n.º 2
0
class TestForksService(TestCase):

    def setUp(self):
        self.fs = Forks(user='******', repo='re_oct')

    def test_LIST(self, request_method):
        request_method.return_value = mock_response_result()
        self.fs.list().all()
        self.assertEqual(request_method.call_args[0],
                         ('get', _('repos/oct/re_oct/forks')))

    def test_CREATE(self, request_method):
        request_method.return_value = mock_response('post')
        self.fs.create()
        self.assertEqual(request_method.call_args[0],
                         ('post', _('repos/oct/re_oct/forks')))
Ejemplo n.º 3
0
 def setUp(self):
     self.fs = Forks(user='******', repo='re_oct')
Ejemplo n.º 4
0
 def setUp(self):
     self.fs = Forks(user='******', repo='re_oct')