示例#1
0
 def test_updates(self):
     token = 'abc123'
     comment = 'hello'
     flags  = [{'name': 'awesome', 'status': '+'}]
     values = {'blocking': 'v1'}
     bug_data = {'update_token': token}
     updates = subject.create_updates(bug_data, comment=comment, flags=flags, values=values)
     expected = {
         'token': token,
         'comments': [{'text': comment}],
         'flags': flags,
         'blocking': 'v1'
     }
     self.assertEqual(expected, updates)
示例#2
0
 def test_invalid_call(self):
     with self.assertRaises(AssertionError):
         subject.create_updates('i am a string')
示例#3
0
 def test_no_updates(self):
     token = 'abc123'
     bug_data = {'update_token': token}
     updates = subject.create_updates(bug_data)
     self.assertEqual({'token': token}, updates)