'Make sure the MapWidget js is passed in the form media and a MapWidget
is actually created'

def assertMapWidget(self, form_instance):

    self.assertTrue(form_instance.is_valid())
    rendered = form_instance.as_p()
    self.assertIn('new    MapWidget(options);', rendered)
    self.assertIn('gis/js/OLMapWidget.js', str(form_instance.media))
