Skip to main content

A set of utilities to test django-rest-framework API's

Project description

django-rest-framework-supertest

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

GitHub Workflow Status (with event) Coverage Status Ruff

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, 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

  • Add Basic Faker Support
  • Assertions APIExceptions
  • Assert Validation Errors
  • Create Faker Shortcuts
  • Work with images and files
  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-rest-framework-supertest-0.0.1.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-rest-framework-supertest-0.0.1.tar.gz.

File metadata

File hashes

Hashes for django-rest-framework-supertest-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5d46b8741342a475d71432ffa87e7a9c90fa07d730627f578285a9263cdb53e7
MD5 706db8c95cbac1694f243b211cafadcd
BLAKE2b-256 33d36d1c5d0aa103f18ffedff4a3c2ae758753ff30b9f5b9d85862ee029f43b4

See more details on using hashes here.

File details

Details for the file django_rest_framework_supertest-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_rest_framework_supertest-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 428809ee3328972d919b30c5a6fb17beed8669117250a0c20ab41a688c925dde
MD5 b0d4ecb3e48fdf0df2c3876b27e24a92
BLAKE2b-256 ebf0bf5358c90617e6d3fcffbcfd1e172fda0e4a4006857f78f6167b7e8f8268

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page