| 79 | |
| 80 | |
| 81 | class TestReadPreferenceObjects(unittest.TestCase): |
| 82 | prefs = [ |
| 83 | Primary(), |
| 84 | PrimaryPreferred(), |
| 85 | Secondary(), |
| 86 | Nearest(tag_sets=[{"a": 1}, {"b": 2}]), |
| 87 | SecondaryPreferred(max_staleness=30), |
| 88 | ] |
| 89 | |
| 90 | def test_pickle(self): |
| 91 | for pref in self.prefs: |
| 92 | self.assertEqual(pref, pickle.loads(pickle.dumps(pref))) |
| 93 | |
| 94 | def test_copy(self): |
| 95 | for pref in self.prefs: |
| 96 | self.assertEqual(pref, copy.copy(pref)) |
| 97 | |
| 98 | def test_deepcopy(self): |
| 99 | for pref in self.prefs: |
| 100 | self.assertEqual(pref, copy.deepcopy(pref)) |
| 101 | |
| 102 | |
| 103 | class TestReadPreferencesBase(IntegrationTest): |
nothing calls this directly
no test coverage detected