mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 08:52:15 +00:00
Much test refactoring
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user