Example #1
0
    def test_get_fields(self):
        """Test get fields API call"""

        body = read_file('data/jira/jira_fields.json')

        httpretty.register_uri(httpretty.GET,
                               JIRA_FIELDS_URL,
                               body=body, status=200)

        client = JiraClient(url='http://example.com', project=None,
                            user='******', password='******',
                            verify=False, cert=None, max_issues=None)

        page = client.get_fields()

        self.assertEqual(httpretty.last_request().method, 'GET')
        self.assertRegex(httpretty.last_request().path, '/rest/api/2/field')

        self.assertEqual(page, body)
Example #2
0
    def test_get_fields(self):
        """Test get fields API call"""

        body = read_file('data/jira/jira_fields.json')

        httpretty.register_uri(httpretty.GET,
                               JIRA_FIELDS_URL,
                               body=body,
                               status=200)

        client = JiraClient(url='http://example.com',
                            project=None,
                            user='******',
                            password='******',
                            verify=False,
                            cert=None,
                            max_issues=None)

        page = client.get_fields()

        self.assertEqual(httpretty.last_request().method, 'GET')
        self.assertRegex(httpretty.last_request().path, '/rest/api/2/field')

        self.assertEqual(page, body)