Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reject updates that contain fedpkg's placeholder text as notes

  • Loading branch information...
commit 76340a7b311acfb5c528f54f3bb9eace0cea6ad0 1 parent 42adfc6
@tchollingsworth tchollingsworth authored lmacken committed
Showing with 17 additions and 1 deletion.
  1. +1 −1  bodhi/controllers.py
  2. +16 −0 bodhi/tests/test_controllers.py
View
2  bodhi/controllers.py
@@ -640,7 +640,7 @@ def save(self, builds, type_, notes, bugs, close_bugs=False, edited=False,
if stable_karma <= unstable_karma:
flash_log("Stable karma must be higher than unstable karma.")
raise InvalidUpdateException(params)
- if not notes:
+ if not notes or notes == "Here is where you give an explanation of your update.":
flash_log('Error: You must supply details for this update')
raise InvalidUpdateException(params)
View
16 bodhi/tests/test_controllers.py
@@ -3144,6 +3144,22 @@ def test_mandatory_notes(self):
self.save_update(params, session)
logs = testutil.get_log()
assert 'Error: You must supply details for this update' in logs
+
+ def test_placeholder_notes(self):
+ session = login()
+ create_release()
+ params = {
+ 'builds' : 'TurboGears-1.0.2.2-2.fc7',
+ 'release' : 'Fedora 7',
+ 'type_' : 'enhancement',
+ 'bugs' : '1234',
+ 'notes' : 'Here is where you give an explanation of your update.',
+ 'autokarma' : True
+ }
+ testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model'])
+ self.save_update(params, session)
+ logs = testutil.get_log()
+ assert 'Error: You must supply details for this update' in logs
def test_new_updateid_url(self):
session = login()
Please sign in to comment.
Something went wrong with that request. Please try again.