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.4.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_rest_framework_supertest-0.0.4.tar.gz.

File metadata

File hashes

Hashes for django_rest_framework_supertest-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d08a6e9ee17bb4874fd95bf3422ffc4461c2828e0424d5787a264b02a7e22e83
MD5 0cf5b3d957b0000060066a69957fa8c2
BLAKE2b-256 03efdf85fb1acfdc0c045bb36642bf7d95b7a926de883d40bf56316ebd1f3768

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_rest_framework_supertest-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e8e7edd57ae529ae41defc6471a18ec7a2fe1f9e9907bdbf9f55b8163ff60f8b
MD5 7864116bf09946c961e8b508b112b7d8
BLAKE2b-256 9bc3ec604c0113700a52982ed324b1b4ba26b4c9e8b4bc28ac8bda3cf9c1cea1

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