spacepaste

  1.  
  2. from .nyx_schema_compare import Utilities
  3. class TestUtilities:
  4. def test_get_diff_from_lists(self):
  5. list_primary = [1,2,3,4]
  6. list_comparator = [1,3,4,5]
  7. expected = [5]
  8. results = Utilities.get_diff_from_lists(list_primary, list_comparator)
  9. assert expected == results
  10. expected = [2]
  11. results = Utilities.get_diff_from_lists(list_comparator, list_primary)
  12. assert expected == results
  13. def test_get_common_from_lists(self):
  14. list_primary = [1, 2, 3, 4]
  15. list_comparator = [1, 3, 4, 5]
  16. expected = [1,3,4]
  17. results = Utilities.get_common_from_lists(list_primary, list_comparator)
  18. assert expected == results
  19.