# (c) cavaliba.com - test / status

from django.core.cache import cache as cache_django
from django.test import TestCase, override_settings
from django.urls import reverse

import app_home.cache as cache
from tests import helper


class AppStatusTest(TestCase):
    def setUp(self):
        cache.clear()
        cache_django.clear()

        helper.add_admin_user(login="unittest")

    def tearDown(self):
        cache_django.clear()

    # @override_settings(CAVALIBA_DEBUG_AAA="yes")
    @override_settings(CAVALIBA_AUTH_MODE="unittest")
    def test_appstatus_list(self):
        response = self.client.get(reverse("app_status:list"))
        self.assertEqual(response.status_code, 200)
