Commit c065d55fd3c92157811a78f350718986de3aa5b5

Authored by ivanka12
1 parent 947222be

add test_modification_data and test_agreement_change_data

@@ -649,6 +649,32 @@ def test_change_data(): @@ -649,6 +649,32 @@ def test_change_data():
649 }) 649 })
650 650
651 651
  652 +def test_agreement_change_data(rationaleType):
  653 + return munchify(
  654 + {
  655 + "data":
  656 + {
  657 + "rationale": fake.description(),
  658 + "rationale_en": fake_en.sentence(nb_words=10, variable_nb_words=True),
  659 + "rationale_ru": fake_ru.sentence(nb_words=10, variable_nb_words=True),
  660 + "rationaleType": rationaleType,
  661 + }
  662 + })
  663 +
  664 +
  665 +def test_modification_data(item_id, field_name, field_value):
  666 + data = {
  667 + "modifications": [
  668 + {
  669 + "itemId": item_id,
  670 + field_name: field_value
  671 + }
  672 + ]
  673 + }
  674 + return munchify({'data':data})
  675 +
  676 +
  677 +
652 def get_hash(file_contents): 678 def get_hash(file_contents):
653 return ("md5:"+hashlib.md5(file_contents).hexdigest()) 679 return ("md5:"+hashlib.md5(file_contents).hexdigest())
654 680
@@ -62,6 +62,8 @@ from .initial_data import ( @@ -62,6 +62,8 @@ from .initial_data import (
62 test_status_data, 62 test_status_data,
63 test_elimination_report, 63 test_elimination_report,
64 test_tender_data_esco, 64 test_tender_data_esco,
  65 + test_modification_data,
  66 + test_agreement_change_data,
65 create_fake_title, 67 create_fake_title,
66 create_fake_value_amount, 68 create_fake_value_amount,
67 test_change_document_data, 69 test_change_document_data,
Please register or login to post a comment