Commits

Hynek Cernoch committed a8e6767

Support for testing with Satchmo. Closes #2

  • Participants
  • Parent commits 0d9e2ea

Comments (0)

Files changed (1)

registration/tests.py

         and creates a new user and redirects after a valid submission.
         
         """
+        try:
+            from livesettings import config_get
+            config_get('SHOP', 'ACCOUNT_VERIFICATION').update('EMAIL')
+        except:
+            pass
+
         # Invalid data fails.
         response = self.client.post(reverse('registration_register'),
                                     data={ 'username': 'alice', # Will fail on username uniqueness.
                                            'email': 'foo@example.com',
+                                           'first_name': 'foo',
+                                           'last_name': 'foo',
                                            'password1': 'foo',
                                            'password2': 'foo' })
         self.assertEqual(response.status_code, 200)
         response = self.client.post(reverse('registration_register'),
                                     data={ 'username': 'foo',
                                            'email': 'foo@example.com',
+                                           'first_name': 'foo',
+                                           'last_name': 'foo',
                                            'password1': 'foo',
                                            'password2': 'foo' })
         self.assertEqual(response.status_code, 302)