Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Added test for missing_package ui report on update dependency view
Browse files Browse the repository at this point in the history
  • Loading branch information
EnTeQuAk committed Oct 1, 2012
1 parent 2c956bc commit cddaee6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions folivora/tests.py
Expand Up @@ -519,6 +519,7 @@ def setUp(self):
self.c = Client()
self.c.login(username='admin', password='pwd')
Package.create_with_provider_url('Django')
Package.create_with_provider_url('Sphinx')
Package.create_with_provider_url('test')
self.new_package = Package.create_with_provider_url('new')

Expand Down Expand Up @@ -620,6 +621,14 @@ def test_update_dependency_parser_missing(self):
self.assertEqual(response.status_code, 200)
self.assertIn('parser', list(response.context['form'].errors))

def test_update_dependency_broken_requirements(self):
response = self.c.post('/project/test/deps/',
{'packages': TestPipRequirementsParsers.BROKEN,
'parser': 'pip_requirements'})
self.assertEqual(response.status_code, 200)
self.assertIn(u'Could not parse the following dependencies: _--.>=asdhasjk ,,, [borked]',
response.context['form'].errors['__all__'])


class TestUserProfileView(TestCase):
def setUp(self):
Expand Down

0 comments on commit cddaee6

Please sign in to comment.