webhooks/bitbucket2: Improve test coverage.

The lack of coverage was due to:

* An unused function that was never used anywhere.
* get_commit_status_changed_body was using a regex where it didn't
  really need to use one. And there was an if statement that
  assumed that the payload might NOT contain the URL to the commit.
  However, I checked the payload and there shouldn't be any instances
  where a commit event is generated but there is no URL to the commit.
* get_push_tag_body had an `else` condition that really can't happen
  in any payload. I verified this by checking the BitBucket webhook
  docs.
This commit is contained in:
Eeshan Garg
2018-09-22 18:08:52 -02:30
committed by Rishi Gupta
parent 185a023745
commit d8101ca139
2 changed files with 8 additions and 14 deletions

View File

@@ -100,7 +100,6 @@ not_yet_fully_covered = {
'zerver/data_import/gitter.py',
'zerver/data_import/import_util.py',
# Webhook integrations with incomplete coverage
'zerver/webhooks/bitbucket2/view.py',
'zerver/webhooks/freshdesk/view.py',
'zerver/webhooks/github/view.py',
'zerver/webhooks/github_legacy/view.py',