Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

89
Views
Testing apps.py in django

How can I write a test to cover my apps.py files for each model in a django application? I need 100% code coverage and cannot figure out how to test these files. Example of one of my apps.py files:

from django.apps import AppConfig

class ReportsConfig(AppConfig):
    name = 'reports'
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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')
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!