Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)