# Path: tests/testapp/forms.py
# class AlternateMediaForm(BaseMediaForm):
#     class Meta:
#         widgets = {
#             "tags": OverridenWidget,
#             "file": OverridenWidget,
#             "thumbnail": OverridenWidget,
#         }
# 
# class OverridenWidget(Widget):
#     pass


from django import forms
from django.test import TestCase, override_settings
from wagtail.admin import widgets
from tests.testapp.forms import AlternateMediaForm, OverridenWidget
from wagtailmedia import models
from wagtailmedia.forms import BaseMediaForm, get_media_base_form, get_media_form




class TestFormOverride(TestCase):
    def test_get_media_base_form(self):
        self.assertIs(get_media_base_form(), BaseMediaForm)

    def test_get_media_form(self):
        bases = get_media_form(models.Media).__bases__
        self.assertIn(BaseMediaForm, bases)

# Path: tests/testapp/forms.py
# class AlternateMediaForm(BaseMediaForm):
#     class Meta:
#         widgets = {
#             "tags": OverridenWidget,
#             "file": OverridenWidget,
#             "thumbnail": OverridenWidget,
#         }
# 
# class OverridenWidget(Widget):
#     pass


# Path: tests/test_form_override.py
from django import forms
from django.test import TestCase, override_settings
from wagtail.admin import widgets
from tests.testapp.forms import AlternateMediaForm, OverridenWidget
from wagtailmedia import models
from wagtailmedia.forms import BaseMediaForm, get_media_base_form, get_media_form





class TestFormOverride(TestCase):
    def test_get_media_base_form(self):
        self.assertIs(get_media_base_form(), BaseMediaForm)

    def test_get_media_form(self):
        bases = get_media_form(models.Media).__bases__
        self.assertIn(BaseMediaForm, bases)

        self.assertNotIn(AlternateMediaForm, bases)