def test_create_user_with_email_successful(self):
    'Test creating a new user with an email is successful'
    email = 'example@example.com'
    password = 'Password123'
    user = get_user_model().objects.create_user(email=email, password=password)
    self.assertEqual(user.email, email)
    self.assertTrue(user.check_password(password))
Test creating a new user with an email is successful
def test_create_user_with_email_successful(self):
    
    email = 'example@example.com'
    password = 'Password123'
    user = get_user_model().objects.create_user(email=email, password=password)
    self.assertEqual(user.email, email)
    self.assertTrue(user.check_password(password))