def test_set_session_data(self): additional_field = String(self.def_value) new_value = 'new_value' uut = DynamicExtended(key=self.the_key, value=self.def_value, additional_field=additional_field) res = uut.render().bytes self.assertEqual(res, self.def_value) uut.set_session_data({self.the_key: new_value}) res = uut.render().bytes self.assertEqual(res, new_value)
def test_default_value(self): additional_field = String('the_string') uut = DynamicExtended(key=self.the_key, value=self.def_value, additional_field=additional_field) res = uut.render().bytes self.assertEqual(res, self.def_value)
def test_not_fuzzable(self): additional_field = String('the_string') uut = DynamicExtended(key=self.the_key, value=self.def_value, additional_field=additional_field, fuzzable=False) res = uut.render().bytes self.assertEqual(res, self.def_value) self.assertEqual(uut.num_mutations(), 0)