From ade2bc33cf339f17213b8bb1baf415f475a24537 Mon Sep 17 00:00:00 2001 From: Jamie Alexandre Date: Thu, 9 Apr 2015 12:30:37 -0700 Subject: [PATCH] Minimal regression test for #2470. --- python-packages/securesync/tests/crypto_tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/python-packages/securesync/tests/crypto_tests.py b/python-packages/securesync/tests/crypto_tests.py index 57a37f25fd..c7c5123256 100755 --- a/python-packages/securesync/tests/crypto_tests.py +++ b/python-packages/securesync/tests/crypto_tests.py @@ -253,3 +253,17 @@ def test_facility_group_save(self): group.save() assert group.zone_fallback is not None, "Centrally created FacilityGroup was not assigned a zone." + +class TestHashableFieldsAndSerialization(unittest.TestCase): + + def test_description_exclusion_regression_bug_2470(self): + + d = Device(name="Test", description="Test") + + good_serialization = d._hashable_representation() + + g = FacilityGroup() + + possibly_bad_serialization = d._hashable_representation() + + self.assertEqual(good_serialization, possibly_bad_serialization, "Instatiating a FacilityGroup changed hashable representation of Device") \ No newline at end of file