def setUp(self):
        super(ReviewerManagerTests, self).setUp()
        self.manager = ReviewerManager()
        self.manager.model = Reviewer

        # create a test user
        user_manager = UserManager()
        user_manager.model = User
        self.user = user_manager.create_user(username="******",
                                             first_name="test",
                                             last_name="test",
                                             email="*****@*****.**",
                                             password="******")

        # create another test user to be used a module leader
        # (module leader model not implemented atm)
        self.module_leader = user_manager.create_user(username="******",
                                                      first_name="Module",
                                                      last_name="Leader",
                                                      email="*****@*****.**",
                                                      password="******")

        # create a test module
        module_model = Module
        self.module = module_model.objects.create(
            module_code="CM1101",
            module_name="Test Module",
            module_credits="10",
            module_level="1",
            semester="Autumn Semester",
            delivery_language="English",
            module_leader=self.module_leader)
    def setUp(self):
        super(LoggedInTestCase, self).setUp()
        # set up sessions in unit tests
        session_engine = import_module(settings.SESSION_ENGINE)
        store = session_engine.SessionStore()
        store.save()
        # set the client
        self.client = Client()
        self.client.cookies[settings.SESSION_COOKIE_NAME] = store.session_key
        manager = UserManager()
        manager.model = User

        # create a sample admin user
        self.admin = manager.create_superuser(
            username='******',
            first_name='admin',
            last_name='admin',
            email='*****@*****.**',
            password='******'
        )

        # create sample basic user
        self.user = manager.create_user(
            username='******',
            first_name='user',
            last_name='user',
            email='*****@*****.**',
            password='******'
        )
    def setUp(self):
        manager = UserManager()
        manager.model = User

        self.password = "******"
        self.user = manager.create(username="******",
                                   first_name="Tester",
                                   last_name="Test",
                                   email="*****@*****.**",
                                   password=self.password)
        self.email = UserPasswordEmail
    def setUp(self):
        super(TestModule, self).setUp()
        user_manager = UserManager()
        user_manager.model = User

        self.model = Module
        self.user = user_manager.create_user(username="******",
                                             first_name="test",
                                             last_name="test",
                                             email="*****@*****.**",
                                             password="******")
    def setUp(self):
        super(ProgrammeTutorTests, self).setUp()
        self.model = ProgrammeTutor

        user_manager = UserManager()
        user_manager.model = User

        self.user = user_manager.create_user(username="******",
                                             first_name="test",
                                             last_name="test",
                                             email="*****@*****.**",
                                             password="******")
    def setUp(self):
        super(ModuleTestCase, self).setUp()

        manager = UserManager()
        manager.model = User

        # Create a sample module leader
        self.module_leader = manager.create_user(
            username='******',
            first_name='Module',
            last_name='Leader',
            email='*****@*****.**',
            password='******'
        )

        # Create a test module
        self.module = Module.objects.create(
            module_code="CMXXXX",
            module_name="Test Module",
            module_credits="10",
            module_level="L1",
            semester="Autumn Semester",
            delivery_language="English",
            module_leader=self.module_leader
        )

        # Create a second test module
        self.module_two = Module.objects.create(
            module_code="CMYYYY",
            module_name="Test Module 2",
            module_credits="10",
            module_level="L1",
            semester="Autumn Semester",
            delivery_language="English",
            module_leader=self.module_leader
        )