This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Surface manifest errors to form (bug 749832)
- Loading branch information
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,6 +210,14 @@ def test_view_manifest_url_default(self): | |
# non-admins. | ||
eq_(self.get_webapp().manifest_url, self.webapp.manifest_url) | ||
|
||
def test_view_edit_manifest_url_empty(self): | ||
# Empty manifest should throw an error. | ||
url = '' | ||
This comment has been minimized.
Sorry, something went wrong. |
||
r = self.client.post(self.edit_url, self.get_dict(manifest_url=url)) | ||
form = r.context['form'] | ||
assert 'manifest_url' in form.errors | ||
assert 'This field is required' in form.errors['manifest_url'][0] | ||
This comment has been minimized.
Sorry, something went wrong.
cvan
Contributor
|
||
|
||
@mock.patch('devhub.tasks.urllib2.urlopen') | ||
def test_view_admin_edit_manifest_url(self, mock_urlopen): | ||
mock_urlopen.return_value = response_mock | ||
|
we probably don't need to show this note if you're an admin and you can change the manifest URL