from django.contrib.auth import get_user_model
from django.urls import reverse

from ocyan.plugin.testing.screenshot_test import ScreenshotTestCase

User = get_user_model()


class ErrorScreenshotTest(ScreenshotTestCase):
    fixtures = ["django/auth", "django/sites"]

    USER_EMAIL = "superuser@uwkm.nl"

    def test_error403(self):
        self.login(email=self.USER_EMAIL)
        self.assertScreenshotOk(
            reverse("error403"),
            category="error403",
        )

    def test_error404(self):
        self.login(email=self.USER_EMAIL)
        self.assertScreenshotOk(
            reverse("error404"),
            category="error404",
        )

    def test_error500(self):
        self.login(email=self.USER_EMAIL)
        self.assertScreenshotOk(
            reverse("error500"),
            category="error500",
        )
