django-rest-framework-supertest


Namedjango-rest-framework-supertest JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/inventare/django-rest-framework-supertest
SummaryA set of utilities to test django-rest-framework API's
upload_time2024-02-12 14:28:15
maintainer
docs_urlNone
authorEduardo Oliveira
requires_python
licenseMIT
keywords django api rest_framework
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": "https://github.com/inventare/django-rest-framework-supertest",
    "name": "django-rest-framework-supertest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django,api,rest_framework",
    "author": "Eduardo Oliveira",
    "author_email": "eduardo_y05@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/bc/6d/036639ee2d9e44bf3d8634afdc8abe928ddeb6852944bbae747e71f75bf9/django-rest-framework-supertest-0.0.2.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",
    "summary": "A set of utilities to test django-rest-framework API's",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/inventare/django-rest-framework-supertest"
    },
    "split_keywords": [
        "django",
        "api",
        "rest_framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "50c4b753d3ae4bdbe8441e242891288700137e4d5bad9e6c72a96812cf395981",
                "md5": "689b5ca83010c3f76519cb9295d8d64e",
                "sha256": "84408dfb21f364ae7c6794067c17ec5d3b818ab53194a8d592808541abedd091"
            },
            "downloads": -1,
            "filename": "django_rest_framework_supertest-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "689b5ca83010c3f76519cb9295d8d64e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 36360,
            "upload_time": "2024-02-12T14:28:09",
            "upload_time_iso_8601": "2024-02-12T14:28:09.423922Z",
            "url": "https://files.pythonhosted.org/packages/50/c4/b753d3ae4bdbe8441e242891288700137e4d5bad9e6c72a96812cf395981/django_rest_framework_supertest-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc6d036639ee2d9e44bf3d8634afdc8abe928ddeb6852944bbae747e71f75bf9",
                "md5": "33fc7008f207ac9f1f0c5f3e74969b28",
                "sha256": "96087ef27cca7a10583507c5b3d481868f3f39d5a09bcb12afb393d9d64b363b"
            },
            "downloads": -1,
            "filename": "django-rest-framework-supertest-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "33fc7008f207ac9f1f0c5f3e74969b28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 25293,
            "upload_time": "2024-02-12T14:28:15",
            "upload_time_iso_8601": "2024-02-12T14:28:15.049174Z",
            "url": "https://files.pythonhosted.org/packages/bc/6d/036639ee2d9e44bf3d8634afdc8abe928ddeb6852944bbae747e71f75bf9/django-rest-framework-supertest-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-12 14:28:15",
    "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,
    "requirements": [],
    "lcname": "django-rest-framework-supertest"
}
        
Elapsed time: 0.19586s