Пример #1
0
    def test_from_json_missing_parts(self):
        json_issue_no_key = {
            'fields': {
                'status': {
                    'name': u'Closed'
                }
            }
        }

        json_issue_no_status = {
            'key': u'CFY-3223',
            'fields': {}
        }

        self.assertIsNone(Issue.from_json(json_issue_no_key))
        self.assertIsNone(Issue.from_json(json_issue_no_status))
Пример #2
0
    def test_from_json(self):
        json_issue = {
            'key': u'CFY-3223',
            'fields': {
                'status': {
                    'name': u'Closed'
                }
            }
        }

        expected_issue = Issue(u'CFY-3223', u'Closed')
        self.assertEqual(Issue.from_json(json_issue), expected_issue)
Пример #3
0
 def test_from_json_no_json(self):
     self.assertIsNone(Issue.from_json(None))
Пример #4
0
 def test_get_json_issue(self):
     self.assertIsNone(Issue.get_json_issue(None, 'jira_team_name'))