30 def test_teachers_created(self):
31 """Check if Teacher is created"""
32
33 self.assertEqual(teacher_number_1.nu_email, '[email protected]')
23
24 student_created = cls(user=user_created, arn=last_arn_number)
25
26 student_created.groups.add(Group.objects.get(name='student_group'))27 print("Returning created student")
28 print(student_created)
29
104 if options['setup_university']:
105 setup_university()
106 if options['add_student_in_dep']:
107 add_students_in_department()108 if options['random_func']:
109 random_func()
110 else:
78 create_super_users()
79
80 if options['deletesuperuser']:
81 delete_super_users() 82
83 if options['group']:
84 # 2 Create Groups
75
76 if options['superuser']:
77 # 1 Add super users
78 create_super_users() 79
80 if options['deletesuperuser']:
81 delete_super_users()
The variable name is not defined where it is used. This will lead to an error during the runtime. Make sure there is no typo. If the name was supposed to be imported, verify that you've actually imported the name.
import os.path
if os.path.exits('setup.cfg'): # misspelled `exists`
print('Found config file')
import os.path
if os.path.exists('setup.cfg'):
print('Found config file')