# Path: mqueue/tests/base.py
# class MqueueBaseTest(TestCase):
#     user: User
# 
#     def setUp(self):
#         self.factory = RequestFactory()
#         self.maxDiff = None
#         self.user = User.objects.create_user(  # type: ignore
#             "myuser", "myemail@test.com", "super_password"
#         )
# 
#     def reset(self):
#         for event in MEvent.objects.all():
#             event.delete()
# 
#     def create_mevent(
#         self,
#         name: str = "M event",
#         url: str = "/",
#         obj_pk: int = 1,
#         notes: str = "Notes",
#     ):
#         self._content_type = ContentType.objects.get_for_model(User)
#         return MEvent.objects.create(
#             name=name,
#             url=url,
#             obj_pk=obj_pk,
#             notes=notes,
#             model=User,
#             content_type=self._content_type,
#         )


from .base import MqueueBaseTest
from django.apps import apps


class MqueueTestApps(MqueueBaseTest):
    def test_apps(self):
        apps.get_app_config("mqueue")

    def test_apps_import_error(self):
        req = (("wrong.model.path", ["c", "d", "u"]),)
        with self.settings(MQUEUE_AUTOREGISTER=req):

# Path: mqueue/tests/base.py
# class MqueueBaseTest(TestCase):
#     user: User
# 
#     def setUp(self):
#         self.factory = RequestFactory()
#         self.maxDiff = None
#         self.user = User.objects.create_user(  # type: ignore
#             "myuser", "myemail@test.com", "super_password"
#         )
# 
#     def reset(self):
#         for event in MEvent.objects.all():
#             event.delete()
# 
#     def create_mevent(
#         self,
#         name: str = "M event",
#         url: str = "/",
#         obj_pk: int = 1,
#         notes: str = "Notes",
#     ):
#         self._content_type = ContentType.objects.get_for_model(User)
#         return MEvent.objects.create(
#             name=name,
#             url=url,
#             obj_pk=obj_pk,
#             notes=notes,
#             model=User,
#             content_type=self._content_type,
#         )


# Path: mqueue/tests/test_apps.py
from .base import MqueueBaseTest
from django.apps import apps



class MqueueTestApps(MqueueBaseTest):
    def test_apps(self):
        apps.get_app_config("mqueue")

    def test_apps_import_error(self):
        req = (("wrong.model.path", ["c", "d", "u"]),)
        with self.settings(MQUEUE_AUTOREGISTER=req):

            apps.get_app_config("mqueue")