Example #1
0
 def test_to_config(self):
     form = JsboxForm(data={
         'javascript': 'x = 1;',
     })
     self.assertTrue(form.is_valid())
     metadata = form.to_config()
     self.assertEqual(metadata, {
         'javascript': 'x = 1;',
         'source_url': '',
     })
Example #2
0
 def test_to_config(self):
     form = JsboxForm(data={
         'javascript': 'x = 1;',
     })
     self.assertTrue(form.is_valid())
     metadata = form.to_config()
     self.assertEqual(metadata, {
         'javascript': 'x = 1;',
         'source_url': '',
     })