Skip to content

Commit

Permalink
Change test to use simple regex
Browse files Browse the repository at this point in the history
Sprint is presented as a serialised Java object. Deserialising back to Python object is too hard. Performing regex comparison on the string is easier.
  • Loading branch information
Danny Cheung committed Jul 31, 2015
1 parent eb3177b commit 314b87f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,10 @@ def test_agile(self):
sprint_customfield = "customfield_" + str(sprint_field_id)

updated_issue_1 = self.jira.issue(self.issue_1)
assert updated_issue_1.fields[sprint_customfield][0]['id'] == s.id
serialised_sprint = getattr(updated_issue_1.fields, sprint_customfield)[0]

# Too hard to serialise the sprint object. Performing simple regex match instead.
assert re.search('\[id=' + str(s.id) + ',', serialised_sprint)

#self.jira.add_issues_to_sprint(s.id, self.issue_2)

Expand Down

0 comments on commit 314b87f

Please sign in to comment.