[Fixed]-Testing apps.py in django

19👍

you could do it like this:

from django.apps import apps
from django.test import TestCase
from reports.apps import ReportsConfig


class ReportsConfigTest(TestCase):
    def test_apps(self):
        self.assertEqual(ReportsConfig.name, 'reports')
        self.assertEqual(apps.get_app_config('reports').name, 'reports')
👤udo

Leave a comment