django-rest-framework-supertest


Namedjango-rest-framework-supertest JSON
Version 0.0.6 PyPI version JSON
download
home_pageNone
SummaryA set of utilities to test django-rest-framework API's
upload_time2024-10-31 17:59:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Eduardo José de Oliveira Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords django rest rest_framework drf test
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-rest-framework-supertest

An **WORK IN PROGRESS** set of utilities to write automated tests for APIS writen in django-rest-framework.

<p align="center">
    <a href='https://github.com/inventare/django-rest-framework-supertest/actions/workflows/tests.yml'><img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/inventare/django-rest-framework-supertest/tests.yml?label=tests" /></a>
    <a href='https://coveralls.io/github/inventare/django-rest-framework-supertest?branch=main'><img src='https://coveralls.io/repos/github/inventare/django-rest-framework-supertest/badge.svg?branch=main' alt='Coverage Status' /></a>
    <a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
</p>

## Motivation

The **django** and **django-rest-framework** is an powerfull set of tools to create **REST API's**. But, testing these **API'**, with automated tests, are a little more complex question. Write a lot of repeated code and the difficult to made all assertions along the **REST API's** responses is some of these problems for our apps.

This project wants to aggregate utilities to made assertions on the responses, like **APIException** responses, and utilities to work with other complex **REST API's** concepts, like pagination and authentication.

## Under the Hood

Under the hood, this is only an set of utilities and this uses some libraries to work correctly. Actually, for fake data generation we use [Faker](https://faker.readthedocs.io/en/master/index.html), with some small custom provider's. For assertions, we use the default **django** and **django-rest-framework** `unittest` features. We provide some **mixins** with our own methods and some base `classes`.

## Roadmap

- [x] Add Basic Faker Support
- [x] Assertions APIExceptions
- [x] Assert Validation Errors
- [x] Create Faker Shortcuts
- [x] Work with images and files
- [x] Assert Serializer Responses
- [ ] Work with pagination
- [ ] Work with multiple types of Authentication

> This is an basic roadmap for the first version and, before the first version release, some new itens can be added here.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-rest-framework-supertest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Eduardo Oliveira <eduardo_y05@outlook.com>",
    "keywords": "django, rest, rest_framework, drf, test",
    "author": null,
    "author_email": "Eduardo Oliveira <eduardo_y05@outlook.com>",
    "download_url": "https://files.pythonhosted.org/packages/55/c1/7d20afc085b54e8d5a4ca008889d9fcfbecbdd5dd91ced21240ddd604541/django_rest_framework_supertest-0.0.6.tar.gz",
    "platform": null,
    "description": "# django-rest-framework-supertest\n\nAn **WORK IN PROGRESS** set of utilities to write automated tests for APIS writen in django-rest-framework.\n\n<p align=\"center\">\n    <a href='https://github.com/inventare/django-rest-framework-supertest/actions/workflows/tests.yml'><img alt=\"GitHub Workflow Status (with event)\" src=\"https://img.shields.io/github/actions/workflow/status/inventare/django-rest-framework-supertest/tests.yml?label=tests\" /></a>\n    <a href='https://coveralls.io/github/inventare/django-rest-framework-supertest?branch=main'><img src='https://coveralls.io/repos/github/inventare/django-rest-framework-supertest/badge.svg?branch=main' alt='Coverage Status' /></a>\n    <a href=\"https://github.com/astral-sh/ruff\"><img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\" alt=\"Ruff\" style=\"max-width:100%;\"></a>\n</p>\n\n## Motivation\n\nThe **django** and **django-rest-framework** is an powerfull set of tools to create **REST API's**. But, testing these **API'**, with automated tests, are a little more complex question. Write a lot of repeated code and the difficult to made all assertions along the **REST API's** responses is some of these problems for our apps.\n\nThis project wants to aggregate utilities to made assertions on the responses, like **APIException** responses, and utilities to work with other complex **REST API's** concepts, like pagination and authentication.\n\n## Under the Hood\n\nUnder the hood, this is only an set of utilities and this uses some libraries to work correctly. Actually, for fake data generation we use [Faker](https://faker.readthedocs.io/en/master/index.html), with some small custom provider's. For assertions, we use the default **django** and **django-rest-framework** `unittest` features. We provide some **mixins** with our own methods and some base `classes`.\n\n## Roadmap\n\n- [x] Add Basic Faker Support\n- [x] Assertions APIExceptions\n- [x] Assert Validation Errors\n- [x] Create Faker Shortcuts\n- [x] Work with images and files\n- [x] Assert Serializer Responses\n- [ ] Work with pagination\n- [ ] Work with multiple types of Authentication\n\n> This is an basic roadmap for the first version and, before the first version release, some new itens can be added here.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Eduardo Jos\u00e9 de Oliveira  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A set of utilities to test django-rest-framework API's",
    "version": "0.0.6",
    "project_urls": {
        "documentation": "https://inventare.github.io/django-rest-framework-supertest/",
        "homepage": "https://github.com/inventare/django-rest-framework-supertest/"
    },
    "split_keywords": [
        "django",
        " rest",
        " rest_framework",
        " drf",
        " test"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e54e30390a16d2ac6a4f9612bce488b46d174811ba046314b75d7aa2529f904",
                "md5": "60f9c1a11745ad4185cad5ed8d50c3e6",
                "sha256": "2368c74e7331b79ada21119de4d0745feb320a5f609d34b276238a4b8a8c16bc"
            },
            "downloads": -1,
            "filename": "django_rest_framework_supertest-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "60f9c1a11745ad4185cad5ed8d50c3e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 36738,
            "upload_time": "2024-10-31T17:59:41",
            "upload_time_iso_8601": "2024-10-31T17:59:41.786148Z",
            "url": "https://files.pythonhosted.org/packages/7e/54/e30390a16d2ac6a4f9612bce488b46d174811ba046314b75d7aa2529f904/django_rest_framework_supertest-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55c17d20afc085b54e8d5a4ca008889d9fcfbecbdd5dd91ced21240ddd604541",
                "md5": "c03f86361f89311c7c83f1fc8c67bf48",
                "sha256": "0d9bcb1f5a54afbc41220f154c83da836363eb6de9085b751f48f31eab88498a"
            },
            "downloads": -1,
            "filename": "django_rest_framework_supertest-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "c03f86361f89311c7c83f1fc8c67bf48",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23659,
            "upload_time": "2024-10-31T17:59:43",
            "upload_time_iso_8601": "2024-10-31T17:59:43.169639Z",
            "url": "https://files.pythonhosted.org/packages/55/c1/7d20afc085b54e8d5a4ca008889d9fcfbecbdd5dd91ced21240ddd604541/django_rest_framework_supertest-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-31 17:59:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "inventare",
    "github_project": "django-rest-framework-supertest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-rest-framework-supertest"
}
        
Elapsed time: 0.66730s