Git Product home page Git Product logo

drf-problems's Introduction

⚔️ Unlimited Code Works ⚔️

My quirks

  • DevOps (CI/CD, Orchestration, GitOps). REST. JAMstack. Fullstack (kill me please :P).
  • Linux. Arch. Wayland. No DE. Check out Wayfire WM.
  • Installed Hackintosh. Patched ACPI tables. Broke system a lot. Obviously fixed them up too. :P
  • If not clear by now, A Poweruser. Oh, btw check out Pipewire.
  • Blogger. Open source contributor (2x GSoC, 1x LFX).
  • Open source Maintainer. Btw, check out DRF Problems and PDFGen.
  • For more flexes, check out my website.
  • Anime. Visual Novel.

Visual profile

trophy language graph

drf-problems's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drf-problems's Issues

Testing | Sample exception + permission | Check response headers and problem code

Code a sample view which uses permissions derived from BaseProblemPermission class and throws a registered exception. Write tests with this view to test the following behaviors:

  • When the permission passes, content type is "application/json".
  • When the permission fails, content type is "application/problem+json" and the problem code is the same as the one declared in the registered exception with the permission.

Testing | ErrorDocumentationView

Write tests for the ErrorDocumentationView for both behaviors:

  • Using a registered problem code, response has content type "application/json" and the data is documented correctly.
  • Using an invalid problem code, response has content type "application/problem+json" and the status is 404.

Create a new version

The latest release is not working with Django 4 due to 65dcccf

Would it be possible to release a version including the fix above?

Testing | Sample view | Check response headers and problem code

Write tests with a sample view to test all of the following behaviors:

  • When response HTTP status is 200, content type is "application/json".
  • When response HTTP status is 401, content type is "application/problem+json" and problem code is "not_authenticated".
  • When response HTTP status is 404, content type is "application/problem+json" and problem code is "not_found".
  • When response HTTP status is 500 (server error - crash your own view), content type is "application/problem+json" and problem code is "error".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.