'Registration still functions properly when
``django.contrib.sites`` is not installed; the fallback will
be a ``RequestSite`` instance.'

@override_settings(INSTALLED_APPS=('django.contrib.auth', 'registration'))
def test_registration_no_sites(self):

    resp = self.client.post(reverse('registration_register'), data={'username': 'bob', 'email': 'bob@example.com', 'password1': 'secret', 'password2': 'secret'})
    self.assertEqual(302, resp.status_code)
    new_user = UserModel().objects.get(username='bob')
    self.failUnless(new_user.check_password('secret'))
    self.assertEqual(new_user.email, 'bob@example.com')
    self.failIf(new_user.is_active)
    self.assertEqual(self.registration_profile.objects.count(), 1)
    self.assertEqual(len(mail.outbox), 1)
