Commit c065d55fd3c92157811a78f350718986de3aa5b5
1 parent
947222be
add test_modification_data and test_agreement_change_data
Showing
2 changed files
with
28 additions
and
0 deletions
... | ... | @@ -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 | 678 | def get_hash(file_contents): |
653 | 679 | return ("md5:"+hashlib.md5(file_contents).hexdigest()) |
654 | 680 | ... | ... |
Please
register
or
login
to post a comment