add faker helper method
This commit is contained in:
parent
d19364c38d
commit
3c7cf9918a
|
@ -134,4 +134,14 @@ class UserFactory(factory.django.DjangoModelFactory):
|
||||||
|
|
||||||
openid_addr = OpenID_Address();
|
openid_addr = OpenID_Address();
|
||||||
openid_id = UUID();
|
openid_id = UUID();
|
||||||
photo_provider = Random(0,0,0, ['VVSU', 'GRAVATAR']);
|
photo_provider = Random(0,0,0, ['VVSU', 'GRAVATAR']);
|
||||||
|
|
||||||
|
def fake(size: int):
|
||||||
|
"""
|
||||||
|
This method is designed to be conveniently used within a
|
||||||
|
django shell, like this:
|
||||||
|
>>> from pairent_app.factories import fake;
|
||||||
|
>>> fake(42);
|
||||||
|
"""
|
||||||
|
ApartmentFactory.create_batch(size);
|
||||||
|
UserFactory.create_batch(size);
|
Loading…
Reference in New Issue