Commit 5d6ec2c358724a59bc9e5f4c7da49ee6687a3ac3
1 parent
2e151f46
Add "id" to document prefix in create_fake_doc
Showing
1 changed file
with
2 additions
and
1 deletions
... | ... | @@ -39,7 +39,8 @@ def translate_country_ru(country): |
39 | 39 | def create_fake_doc(): |
40 | 40 | content = fake.text() |
41 | 41 | suffix = fake.random_element(('.doc', '.docx', '.pdf')) |
42 | - tf = NamedTemporaryFile(delete=False, suffix=suffix) | |
42 | + prefix = "{}-{}{}".format("d", fake.uuid4()[:8], fake_en.word()) | |
43 | + tf = NamedTemporaryFile(delete=False, suffix=suffix, prefix=prefix) | |
43 | 44 | tf.write(content) |
44 | 45 | tf.close() |
45 | 46 | return tf.name | ... | ... |
Please
register
or
login
to post a comment