borgia-app / Borgia

https://sibers.borgia-app.com
15 stars 7 forks source link

Tests should have random data #130

Open AlexandrePalo opened 3 years ago

AlexandrePalo commented 3 years ago

Tests should use randomized data to be repeatable.

We should use an API such as Faker.

For instance:

self.user_only_username = User.objects.create(username='userOnlyUsername')

May be:

from faker import Faker
faker = Faker('fr_FR')
self.user_only_username = User.objects.create(username=faker.user_name())
AlexandrePalo commented 3 years ago

Work in progress on the branch moreTests.