Skip to content

Commit

Permalink
Correct a message type causing missing coverage
Browse files Browse the repository at this point in the history
I noticed today that we were missing test coverage on one line and
one jump in the updates handler. It turned out that when I
converted the codebase to use Fedora Messages, I had accidentally
chosen the incorrect type for one of the messages and this resulted
in missing coverage on a line and a jump.

This commit corrects that error and raises coverage again to 100%
in the updates handler.

Signed-off-by: Randy Barlow <[email protected]>
  • Loading branch information
bowlofeggs authored and mergify[bot] committed Jun 12, 2019
1 parent ea439a1 commit 639e140
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ omit =

[report]
precision = 2
fail_under = 99.2
fail_under = 99.3
exclude_lines =
pragma: no cover
class DevBuildsys
Expand Down
5 changes: 2 additions & 3 deletions bodhi/tests/server/consumers/test_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,11 @@ def test_request_testing(self, work_on_bugs, fetch_test_cases, sleep):
h = updates.UpdatesHandler()
h.db_factory = base.TransactionalSessionMaker(self.Session)
update = models.Build.query.filter_by(nvr='bodhi-2.0-1.fc17').one().update
message = UpdateEditV1(
message = UpdateRequestTestingV1(
body={
'update': {'alias': update.alias, 'builds': [{'nvr': 'bodhi-2.0-1.fc17'}],
'user': {'name': 'brodhi'}, 'status': str(update.status),
'request': str(update.request)},
'new_bugs': [12345]})
'request': str(update.request)}})

h(message)

Expand Down

0 comments on commit 639e140

Please sign in to comment.