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

@@ -57,14 +57,14 @@ class Command(BaseCommand):
def create_categories(self):
choices = ['Case', 'Video', 'General', 'Sound', 'Lighting', 'Rigging']
pk = 1
pk = 99
for cat in choices:
self.categories.append(models.AssetCategory(pk=pk, name=cat))
pk += 1
def create_assets(self):
asset_description = ['Large cable', 'Shiny thing', 'New lights', 'Really expensive microphone', 'Box of fuse flaps', 'Expensive tool we didn\'t agree to buy', 'Cable drums', 'Boring amount of tape', 'Video stuff no one knows how to use', 'More amplifiers', 'Heatshrink']
pk = 1
pk = 9000
for i in range(100):
asset = models.Asset(
pk=pk,
@@ -89,7 +89,7 @@ class Command(BaseCommand):
csas = [0.75, 1.00, 1.25, 2.5, 4]
lengths = [1, 2, 5, 10, 15, 20, 25, 30, 50, 100]
pk = 102 # Offset to avoid other asset IDs
pk = 200 # Offset to avoid other asset IDs
for i in range(100):
asset = models.Asset(
pk=pk,