|
|
@ -40,10 +40,17 @@ class TestWithoutLogin(TestCase): |
|
|
|
self.assertEqual(200, self.response.status_code) |
|
|
|
if not type(response) == HttpResponse: |
|
|
|
if 'form' in response.context: |
|
|
|
print('CONTENT') |
|
|
|
print(response.content) |
|
|
|
print('ITEMS') |
|
|
|
print(response.items()) |
|
|
|
self.assertFalse(response.context['form'].errors) |
|
|
|
else: |
|
|
|
print(response.context) |
|
|
|
raise BaseException("NO FORM FOUND") |
|
|
|
if expected_form: |
|
|
|
print(response.context) |
|
|
|
raise BaseException("NO FORM FOUND") |
|
|
|
else: |
|
|
|
self.assertContains(response,"Deine Anfrage wurde gesendet.") |
|
|
|
self.assertEqual( |
|
|
|
type(response.context['wizard']['form']), |
|
|
|
expected_form |
|
|
@ -55,6 +62,8 @@ class TestWithoutLogin(TestCase): |
|
|
|
self.response = self.client.get('/') |
|
|
|
self.assertEqual(200, self.response.status_code) |
|
|
|
|
|
|
|
print("\n\nEINS EINS\n\n") |
|
|
|
|
|
|
|
response = self._postform({ |
|
|
|
'extern_view-current_step': '0', |
|
|
|
'0-realname': 'vladimir reiherzehe', |
|
|
@ -64,6 +73,16 @@ class TestWithoutLogin(TestCase): |
|
|
|
'0-check': True |
|
|
|
}, LibraryForm) |
|
|
|
|
|
|
|
print("\n\nZWEI ZWEI\n\n") |
|
|
|
|
|
|
|
response = self._postform({ |
|
|
|
'extern_view-current_step': '1', |
|
|
|
'1-cost': 'teuroooo!', |
|
|
|
'1-duration': 'looooong', |
|
|
|
'1-library': 'of congress', |
|
|
|
}, None) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestWithLogin(TestCase): |
|
|
|
|
|
|
|