Beispiel #1
0
 def test_tracestate_update_invalid(self):
     state = TraceState([("a", "1")])
     new_state = state.update("a", "2=/")
     self.assertNotEqual(new_state.get("a"), "2=/")
     new_state = new_state.update("a", ",,2,,f")
     self.assertNotEqual(new_state.get("a"), ",,2,,f")
     self.assertEqual(new_state.get("a"), "1")
Beispiel #2
0
 def test_tracestate_update_valid(self):
     state = TraceState([("a", "1")])
     new_state = state.update("a", "2")
     self.assertEqual(new_state.get("a"), "2")
     new_state = new_state.add("b", "3")
     self.assertNotEqual(state, new_state)