Private
Public Access
1
0

passing first races test

This commit is contained in:
Sander Roosendaal
2019-02-12 15:30:30 +01:00
parent f94dcec851
commit 3bbc93b4f4
9 changed files with 1944 additions and 35 deletions

View File

@@ -103,6 +103,7 @@ def get_random_file(filename='rowers/tests/testdata/testdata.csv',name=''):
hours = int(totaltime/3600.)
minutes = int((totaltime - 3600.*hours)/60.)
seconds = int(totaltime - 3600.*hours - 60.*minutes)
tenths = int(10*(totaltime - 3600.*hours - 60.*minutes - seconds))
@@ -138,9 +139,10 @@ def get_random_file(filename='rowers/tests/testdata/testdata.csv',name=''):
class UserFactory(factory.DjangoModelFactory):
class Meta:
model = User
django_get_or_create = ('username',)
email = faker.email()
username = faker.profile()['username']
email = factory.LazyAttribute(lambda _: faker.email())
username = factory.LazyAttribute(lambda _: faker.profile()['username'])
first_name = faker.name().split(' ')[0]
last_name = faker.name().split(' ')[0]