Commit d7ccd3fe2a00269abb4fc244b7c34456d589a76a

Authored by Andrew Yanovych
1 parent c1c9ab9a

added tmpfile generator

... ... @@ -6,6 +6,14 @@ from faker import Factory
6 6 fake = Factory.create('uk_UA')
7 7 fake_ru = Factory.create('ru')
8 8 fake_en = Factory.create()
  9 +from tempfile import NamedTemporaryFile
  10 +
  11 +def create_fake_doc():
  12 + content = fake.text()
  13 + tf = NamedTemporaryFile(delete=False)
  14 + tf.write(content)
  15 + tf.close()
  16 + return tf.name
9 17
10 18 def test_tender_data(period_interval=2):
11 19 now = datetime.now()
... ...
Please register or login to post a comment