maximilianhurl / bravado-django-test-client Goto Github PK
View Code? Open in Web Editor NEWDjango test based http client for https://github.com/Yelp/bravado
License: MIT License
Django test based http client for https://github.com/Yelp/bravado
License: MIT License
It will be helpful to include some pytest fixtures that can be used.. at least some examples should be used in the tests for copy pasta.
We the library works with the DRF test client but we should ensure it also works with the standard django test client.
In there are parameters in a GET operation with the "in: query" specifier, they don't seem to be currently passed on to Django as query parameters. Maybe I have misunderstood something but for me the fix was to change DjangoTestFutureAdapter from this:
# convert data from a string to json
data = request.get("data", None)
if data:
data = json.loads(data)
to this:
if request['method'].lower() == 'get':
data = request.get('params', None)
else:
# convert data from a string to json
data = request.get("data", None)
if data:
data = json.loads(data)
The spec I have looks roughly like this:
/objects/:
get:
...
parameters:
- name: "identifier"
in: query
required: true
type: string
and in the test case I use it something like this:
objects = client.objects.get_objects(
identifier='X'
).result()
Add a full test suite running django, drf with coverage.
Add a free CI to run the test suite and report on coverage.
Ensure that all the different use cases are coverage
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.