Create the training database (#463)

Co-authored-by: josephjboyden <josephjboyden@gmail.com>
This commit is contained in:
2022-01-18 15:47:53 +00:00
committed by GitHub
parent eaf891daf7
commit d25381b2de
85 changed files with 12550 additions and 841 deletions

View File

@@ -0,0 +1,37 @@
import pytest
from training import models
from RIGS.models import Profile
@pytest.fixture
def trainee(db):
trainee = Profile.objects.create(username="trainee", first_name="Train", last_name="EE",
initials="TRN",
email="trainee@example.com", is_active=True, is_approved=True)
yield trainee
trainee.delete()
@pytest.fixture
def supervisor(db):
supervisor = Profile.objects.create(username="supervisor", first_name="Super", last_name="Visor",
initials="SV",
email="supervisor@example.com", is_supervisor=True, is_active=True, is_approved=True)
yield supervisor
supervisor.delete()
@pytest.fixture
def training_item(db):
training_category = models.TrainingCategory.objects.create(reference_number=1, name="The Basics")
training_item = models.TrainingItem.objects.create(category=training_category, reference_number=1, name="How Not To Die")
yield training_item
training_category.delete()
training_item.delete()
@pytest.fixture
def level(db):
level = models.TrainingLevel.objects.create(description="There is no description.", level=models.TrainingLevel.TECHNICIAN)
yield level
level.delete()