{"id":16624261,"url":"https://github.com/dcramer/pytest-django-lite","last_synced_at":"2025-06-16T03:34:29.612Z","repository":{"id":5845091,"uuid":"7061535","full_name":"dcramer/pytest-django-lite","owner":"dcramer","description":"The bare minimum to integrate py.test with Django.","archived":false,"fork":false,"pushed_at":"2014-01-30T06:48:31.000Z","size":181,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-06T11:18:57.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcramer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-07T23:12:26.000Z","updated_at":"2023-09-08T16:36:37.000Z","dependencies_parsed_at":"2022-08-31T15:42:26.920Z","dependency_job_id":null,"html_url":"https://github.com/dcramer/pytest-django-lite","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpytest-django-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpytest-django-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpytest-django-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcramer%2Fpytest-django-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcramer","download_url":"https://codeload.github.com/dcramer/pytest-django-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238913053,"owners_count":19551475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T03:45:42.785Z","updated_at":"2025-02-14T21:31:21.542Z","avatar_url":"https://github.com/dcramer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A minimal plugin to integrate Django and py.test.\n\nUsage\n=====\n\nInstall the plugin:\n\n::\n\n    pip install pytest-django-lite\n\n\nConfiguring Django\n==================\n\nYou have two options to configure your testsuite's Django settings.\n\n1. Create a conftest.py\n-----------------------\n\n.. code:: python\n\n    def pytest_configure(config):\n        from django.conf import settings\n\n        settings.configure(\n            DATABASES={},\n            INSTALLED_APPS=[],\n            # etc\n        )\n\n\n2. Pass ``DJANGO_SETTINGS_MODULE``\n----------------------------------\n\n::\n\n    DJANGO_SETTINGS_MODULE=myapp.settings py.test\n\n\nWrite Tests\n===========\n\n.. code:: python\n\n    from django.test import TestCase\n    from myapp.models import Foo\n\n    class MyTest(TestCase):\n        def test_foo(self):\n            assert Foo.objects.count() == 2\n\n\n.. note:: This only supports classical Django tests (class-based inheritence)\n\n\nCredits\n=======\n\nThis was originally based on `pytest-django \u003chttps://github.com/pelme/pytest_django\u003e`_.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcramer%2Fpytest-django-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcramer%2Fpytest-django-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcramer%2Fpytest-django-lite/lists"}