'test that a non superuser cannot register when registration is admin only.'

@override_settings(REGISTRATION_MODE=u'admin_only')
def test_auth_registration_admin_only_fails_if_not_admin(self):

    url = u'/v1/auth/register'
    submit = {u'username': u'testuser', u'password': u'password', u'first_name': u'test', u'last_name': u'user', u'email': u'test@user.com', u'is_superuser': False, u'is_staff': False}
    response = self.client.post(url, json.dumps(submit), content_type=u'application/json')
    self.assertEqual(response.status_code, 403)
