from django.test import TestCase

# Create your tests here.

from django.test import TestCase
from django.utils import timezone
from accounts.models import CustomUser, CustomUserManager


class UserCreateTestCase(TestCase):
    def test_create_user_correctly(self):
        "Creating users correctly"

        new_user = CustomUser.objects.create(
            email="participant@gmail.com",
            name="Participant Name",
            phone="09876543210",
            school="Some University",
            is_staff="False",
            is_active="True",
            date_joined=timezone.now())

        self.assertTrue(isinstance(new_user, CustomUser))
        self.assertEqual(new_user.get_full_name(), "Participant Name")
        self.assertEqual(new_user.get_short_name(), "Participant Name")

Add test for creating accounts
Add test for creating accounts

  from django.test import TestCase
+ from django.utils import timezone
+ from accounts.models import CustomUser, CustomUserManager
  
- # Create your tests here.
  
+ class UserCreateTestCase(TestCase):
+     def test_create_user_correctly(self):
+         "Creating users correctly"
+ 
+         new_user = CustomUser.objects.create(
+             email="participant@gmail.com",
+             name="Participant Name",
+             phone="09876543210",
+             school="Some University",
+             is_staff="False",
+             is_active="True",
+             date_joined=timezone.now())
+ 
+         self.assertTrue(isinstance(new_user, CustomUser))
+         self.assertEqual(new_user.get_full_name(), "Participant Name")
+         self.assertEqual(new_user.get_short_name(), "Participant Name")
+ 
Add test for creating accounts
## Code Before:
from django.test import TestCase

# Create your tests here.

## Instruction:
Add test for creating accounts
## Code After:
from django.test import TestCase
from django.utils import timezone
from accounts.models import CustomUser, CustomUserManager


class UserCreateTestCase(TestCase):
    def test_create_user_correctly(self):
        "Creating users correctly"

        new_user = CustomUser.objects.create(
            email="participant@gmail.com",
            name="Participant Name",
            phone="09876543210",
            school="Some University",
            is_staff="False",
            is_active="True",
            date_joined=timezone.now())

        self.assertTrue(isinstance(new_user, CustomUser))
        self.assertEqual(new_user.get_full_name(), "Participant Name")
        self.assertEqual(new_user.get_short_name(), "Participant Name")
