def test_register_response(self): """ This simulates a registration and verifies that it receives a successful url request """ request = self.factory.get('/register/') response = user_reg(request) self.assertEqual(response.status_code, 200)
def test_new_user(self): """ This simulates the creation of a new user and verifies that it receives a successful url request """ request = self.factory.post('/register/', { 'username': '******', 'email': '*****@*****.**', 'password1': 'dummypass', 'password2': 'dummypass', 'first_name': 'dummyfirst', 'last_name': 'dummylast', 'native_lang': 'English', }) response = user_reg(request) self.assertEqual(response.status_code, 200)