def test_password_too_short(self):
    'tests that the password must be more than 5 characters'
    payload = {'email': 'example@example.com', 'password': 'pass', 'name': 'John Doe'}
    res = self.client.post(CREATE_USER_URL, payload)
    self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
    user_exists = get_user_model().objects.filter(email=payload['email']).exists()
    self.assertFalse(user_exists)
tests that the password must be more than 5 characters
def test_password_too_short(self):
    
    payload = {'email': 'example@example.com', 'password': 'pass', 'name': 'John Doe'}
    res = self.client.post(CREATE_USER_URL, payload)
    self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
    user_exists = get_user_model().objects.filter(email=payload['email']).exists()
    self.assertFalse(user_exists)