コード例 #1
0
ファイル: test_issues.py プロジェクト: 5783354/python-github3
class TestEventsService(TestCase):

    def setUp(self):
        self.ev = Events(user='******', repo='Hello-World')

    def test_LIST_by_issue(self, request_method):
        request_method.return_value = mock_response_result()
        self.ev.list_by_issue(1).all()
        self.assertEqual(request_method.call_args[0],
            ('get', _('repos/octocat/Hello-World/issues/1/events')))

    def test_LIST_by_repo(self, request_method):
        request_method.return_value = mock_response_result()
        self.ev.list_by_repo().all()
        self.assertEqual(request_method.call_args[0],
            ('get', _('repos/octocat/Hello-World/issues/events')))

    def test_GET(self, request_method):
        request_method.return_value = mock_response()
        self.ev.get(1)
        self.assertEqual(request_method.call_args[0],
            ('get', _('repos/octocat/Hello-World/issues/events/1')))
コード例 #2
0
class TestEventsService(TestCase):
    def setUp(self):
        self.ev = Events(user='******', repo='Hello-World')

    def test_LIST_by_issue(self, request_method):
        request_method.return_value = mock_response_result()
        self.ev.list_by_issue(1).all()
        self.assertEqual(
            request_method.call_args[0],
            ('get', _('repos/octocat/Hello-World/issues/1/events')))

    def test_LIST_by_repo(self, request_method):
        request_method.return_value = mock_response_result()
        self.ev.list_by_repo().all()
        self.assertEqual(request_method.call_args[0],
                         ('get', _('repos/octocat/Hello-World/issues/events')))

    def test_GET(self, request_method):
        request_method.return_value = mock_response()
        self.ev.get(1)
        self.assertEqual(
            request_method.call_args[0],
            ('get', _('repos/octocat/Hello-World/issues/events/1')))
コード例 #3
0
 def setUp(self):
     self.ev = Events(user='******', repo='Hello-World')
コード例 #4
0
ファイル: test_issues.py プロジェクト: 5783354/python-github3
 def setUp(self):
     self.ev = Events(user='******', repo='Hello-World')