Skip to content

Commit

Permalink
issue webcompat#3360 - adds a test for reported_with
Browse files Browse the repository at this point in the history
We were not testing that we were getting the value we needed when it exists.
  • Loading branch information
karlcow committed Jul 2, 2020
1 parent e48e2e7 commit 037fd68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/test_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ def test_get_form(self):
"""Check we return the right form with the appropriate data."""
with webcompat.app.test_request_context('/issues/new'):
form_data = {'user_agent': FIREFOX_UA,
'url': 'http://example.net/'}
'url': 'http://example.net/',
'src': 'desktop-reporter'}
actual = form.get_form(form_data)
expected_browser = 'Firefox 48.0'
expected_os = 'Mac OS X 10.11'
self.assertIsInstance(actual, form.IssueForm)
self.assertEqual(actual.browser.data, expected_browser)
self.assertEqual(actual.os.data, expected_os)
self.assertEqual(actual.reported_with.data, 'desktop-reporter')

def test_get_metadata(self):
"""HTML comments need the right values depending on the keys."""
Expand Down

0 comments on commit 037fd68

Please sign in to comment.