def test_insert_alumno_error(self):

        username = '******'
        alumno1 = Alumno(username=username, first_name= self.alumn1_nombre,last_name= self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username, first_name= self.alumn1_nombre,last_name= self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username, first_name= self.alumn1_nombre,last_name= self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username, first_name= self.alumn1_nombre,last_name= self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username, first_name= self.alumn1_nombre,last_name= self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)
    def test_insert_alumno_repetido(self):

        alumno1 = Alumno(username=self.alumn1_username, first_name=self.alumn1_nombre, last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['data'].username, alumno1.username)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)
    def test_insert_alumno_repetido(self):

        alumno1 = Alumno(username=self.alumn1_username,
                         first_name=self.alumn1_nombre,
                         last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['data'].username, alumno1.username)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)
    def setUp(self):
        self.presidente = tfg_services.insert_profesor(Profesor(username='******',
                                                                first_name='presidente', last_name='pepe',
                                                                departamento='black mesa4'))['data']
        self.titular_1 = tfg_services.insert_profesor(Profesor(username='******',
                                                               first_name='titular_1', last_name='paco',
                                                               departamento='black mesa3'))['data']
        self.titular_2 = tfg_services.insert_profesor(Profesor(username='******',
                                                               first_name='titular_2', last_name='pepe',
                                                               departamento='black mesa1'))['data']
        self.sup_presidente = tfg_services.insert_profesor(Profesor(username='******',
                                                                    first_name='sup_presidente', last_name='pepe',
                                                                    departamento='black mesa3'))['data']
        self.sup_titular_1 = tfg_services.insert_profesor(Profesor(username='******',
                                                                   first_name='sup_titular_1', last_name='manuel',
                                                                   departamento='black mesa2'))['data']
        self.sup_titular_2 = tfg_services.insert_profesor(Profesor(username='******',
                                                                   first_name='sup_titular_2', last_name='pepe',
                                                                   departamento='black mesa2'))['data']

        self.user_alumn1_tfg = tfg_services.insert_alumno(Alumno(username='******', first_name='alumn1',
                                                                 last_name='apellidos 1'))['data']

        self.grupo_profesores = Group.objects.get_or_create(name='Profesores')
        self.grupo_alumnos = Group.objects.get_or_create(name='Alumnos')
    def setUp(self):

        self.alumn1_username = "******"
        self.alumn1_nombre = "alumno 1"
        self.alumn1_apellidos = "apellido 1 apellido 12"

        self.otro_username = "******"
        self.otro_nombre = "alumno 2"
        self.otro_apellidos = "apellido 2 apellido 22"

        self.new_username = "******"
        self.new_nombre = "alumno 3"
        self.new_apellidos = "apellido 3 apellido 33"

        self.alumno1 = tfg_services.insert_alumno(
            Alumno(username=self.alumn1_username, first_name=self.alumn1_nombre, last_name=self.alumn1_apellidos)
        )["data"]

        self.alumno2 = tfg_services.insert_alumno(
            Alumno(username=self.otro_username, first_name=self.otro_nombre, last_name=self.otro_apellidos)
        )["data"]
Beispiel #6
0
    def setUp(self):

        self.alumn1_username = '******'
        self.alumn1_nombre = 'alumno 1'
        self.alumn1_apellidos = 'apellido 1 apellido 12'

        self.otro_username = '******'
        self.otro_nombre = 'alumno 2'
        self.otro_apellidos = 'apellido 2 apellido 22'

        self.alumno1 = tfg_services.insert_alumno(
            Alumno(username=self.alumn1_username,
                   first_name=self.alumn1_nombre,
                   last_name=self.alumn1_apellidos,
                   password='******'))
    def test_insert_alumno_error(self):

        username = '******'
        alumno1 = Alumno(username=username,
                         first_name=self.alumn1_nombre,
                         last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username,
                         first_name=self.alumn1_nombre,
                         last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username,
                         first_name=self.alumn1_nombre,
                         last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username,
                         first_name=self.alumn1_nombre,
                         last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)

        username = '******'
        alumno1 = Alumno(username=username,
                         first_name=self.alumn1_nombre,
                         last_name=self.alumn1_apellidos)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)
    def setUp(self):

        self.alumn1_username = "******"
        self.alumn1_nombre = "alumno 1"
        self.alumn1_apellidos = "apellido 1 apellido 12"

        self.otro_username = "******"
        self.otro_nombre = "alumno 2"
        self.otro_apellidos = "apellido 2 apellido 22"

        self.alumno1 = tfg_services.insert_alumno(
            Alumno(
                username=self.alumn1_username,
                first_name=self.alumn1_nombre,
                last_name=self.alumn1_apellidos,
                password="******",
            )
        )
    def setUp(self):
        self.presidente = tfg_services.insert_profesor(
            Profesor(username='******',
                     first_name='presidente',
                     last_name='pepe',
                     departamento='black mesa4'))['data']
        self.titular_1 = tfg_services.insert_profesor(
            Profesor(username='******',
                     first_name='titular_1',
                     last_name='paco',
                     departamento='black mesa3'))['data']
        self.titular_2 = tfg_services.insert_profesor(
            Profesor(username='******',
                     first_name='titular_2',
                     last_name='pepe',
                     departamento='black mesa1'))['data']
        self.sup_presidente = tfg_services.insert_profesor(
            Profesor(username='******',
                     first_name='sup_presidente',
                     last_name='pepe',
                     departamento='black mesa3'))['data']
        self.sup_titular_1 = tfg_services.insert_profesor(
            Profesor(username='******',
                     first_name='sup_titular_1',
                     last_name='manuel',
                     departamento='black mesa2'))['data']
        self.sup_titular_2 = tfg_services.insert_profesor(
            Profesor(username='******',
                     first_name='sup_titular_2',
                     last_name='pepe',
                     departamento='black mesa2'))['data']

        self.user_alumn1_tfg = tfg_services.insert_alumno(
            Alumno(username='******',
                   first_name='alumn1',
                   last_name='apellidos 1'))['data']

        self.grupo_profesores = Group.objects.get_or_create(name='Profesores')
        self.grupo_alumnos = Group.objects.get_or_create(name='Alumnos')
    def test_insert_alumno_apellidos(self):

        alumno1 = Alumno(username=self.alumn1_username,
                         first_name=self.alumn1_nombre)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)
    def test_insert_alumno_vacio(self):

        alumno = Alumno()
        result = tfg_services.insert_alumno(alumno)
        self.assertEqual(result['status'], False)
    def test_insert_alumno_apellidos(self):

        alumno1 = Alumno(username=self.alumn1_username, first_name= self.alumn1_nombre)
        result = tfg_services.insert_alumno(alumno1)
        self.assertEqual(result['status'], False)
    def test_insert_alumno_vacio(self):

        alumno = Alumno()
        result = tfg_services.insert_alumno(alumno)
        self.assertEqual(result['status'], False)