Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-gray-tangent committed Jun 13, 2024
1 parent 90726bf commit f73f983
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/general/tests/test_dev_mass_upload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import random
import unittest
from unittest.mock import MagicMock

Expand Down Expand Up @@ -44,12 +45,15 @@ def test_check_file_type_pdf(self):
def test_save_data(self):
self.command = Command()
# Create some Institutions instances for testing
for _ in range(20):
for i in range(1, 30):
random_number = random.randint(1, 1000)

Institution.objects.create(
name=self.fake.company(),
abbreviation=self.fake.company_suffix(),
url=self.fake.url(),
email=self.fake.company_email(),
id=i,
name=str(random_number) + "_" + self.fake.company(),
abbreviation=str(random_number) + "_" + self.fake.company_suffix(),
url=str(random_number) + "_" + self.fake.url(),
email=str(random_number) + "_" + self.fake.company_email(),
logo="",
)

Expand Down

0 comments on commit f73f983

Please sign in to comment.