Example #1
0
 def test_sub_list(self):
     self.assertIn("dolor", dict2form(my_dict_with_sub_list))
Example #2
0
 def test_int_value(self):
     self.assertIn("666", dict2form(my_dict_with_int_value))
Example #3
0
 def test_submit(self):
     self.assertIn("submit", dict2form(my_dict))
Example #4
0
 def test_in_form(self):
     self.assertIn("<form", dict2form(my_dict))
Example #5
0
 def test_type(self):
     self.assertIsInstance(dict2form(my_dict), str)
Example #6
0
 def render(self, dictionary, name="object", method="POST", xsrf=None):
     hide = ['_id', 'slug', 'id']
     xsrf = xsrf.split('value="')[1].split('"')[0]
     return dict2form(dictionary, name=name, hide=hide, xsrf=xsrf)
Example #7
0
 def render(self, dictionary, name="object", method="POST", xsrf=None):
     hide = ["_id", "slug", "id"]
     xsrf = xsrf.split('value="')[1].split('"')[0]
     return dict2form(dictionary, name=name, hide=hide, xsrf=xsrf)