Much test refactoring

This commit is contained in:
2021-02-04 13:06:23 +00:00
parent 7eea868575
commit 3853ad0871
15 changed files with 360 additions and 379 deletions

View File

@@ -1,6 +1,7 @@
from django.core.management import call_command
from django.core.management.base import BaseCommand
import time
from RIGS import models
class Command(BaseCommand):
help = 'Adds sample data to use for testing'
@@ -9,3 +10,4 @@ class Command(BaseCommand):
def handle(self, *args, **options):
call_command('generateSampleRIGSData')
call_command('generateSampleAssetsData')
# call_command('createinitialrevisions') TODO

View File

@@ -41,7 +41,7 @@ class Command(BaseCommand):
with transaction.atomic():
models.VatRate.objects.create(start_at='2014-03-05', rate=0.20, comment='test1')
self.setupGenericProfiles()
# self.setupGenericProfiles()
self.setupUsefulProfiles()
models.Profile.objects.bulk_create(self.profiles)
@@ -157,6 +157,7 @@ class Command(BaseCommand):
for i, name in enumerate(names):
pk = i + 1
newVenue = models.Venue(pk=pk, name=name)
if i % 2 == 0:
newVenue.three_phase_available = True