예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)
예제 #6
0
 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)