Guest User

Untitled

a guest
Dec 12th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. '''some assertion example'''
  2.  
  3. a_nested_dict = {
  4. 'element1': [
  5. {'key1', 'value1'}
  6. {'key2', 'value2'}
  7. ],
  8. 'element2': [
  9. {'key3', 'value3'}
  10. ]
  11. }
  12. new_dictionary = {} #similar to a_nested_dict
  13. assertDictEqual(a_nested_dict, new_dictionary)
  14.  
  15. a_nested_list = [
  16. {
  17. 'key1': [1,2,3],
  18. 'key2': ['a','b'],
  19. },
  20. {
  21. 'key1': [4,5,6],
  22. 'key2': ['c','d'],
  23. },
  24. ]
  25. new_list = [] #similar to a_nested_list
  26. assertListEqual(a_nested_list, new_list)
Add Comment
Please, Sign In to add comment