parent
7c09b55fa9
commit
c9113bdc6e
5 changed files with 43 additions and 10 deletions
@ -0,0 +1,27 @@ |
||||
# -*- coding: utf-8 -*- |
||||
from random import randint |
||||
|
||||
from faker.providers import BaseProvider |
||||
|
||||
|
||||
def random_digits(n): |
||||
range_start = 10**(n - 1) |
||||
range_end = (10**n) - 1 |
||||
return randint(range_start, range_end) |
||||
|
||||
|
||||
class CustomDataProvider(BaseProvider): |
||||
def inn(self): |
||||
return random_digits(12) |
||||
|
||||
def kpp(self): |
||||
return random_digits(9) |
||||
|
||||
def checking_account(self): |
||||
return random_digits(25) |
||||
|
||||
def bik(self): |
||||
return random_digits(9) |
||||
|
||||
def corr_acc(self): |
||||
return random_digits(20) |
||||
Loading…
Reference in new issue