Comments (5)
@xadahiya I checked with the codebase...the assertion error is because we have set up authentication for all the endpoints in api. with set_authentication(self.app, True):
at line 55 in test_auth.py
.
Hence it shall always give a response with status code 401
.
So should I remove the authentication for the tests or shall I change the assertion to
assert response_get.status_code == 401
from hydrus.
Try reverting to before #88 and then running the tests.
As far as I know no major changes other than that were made.
from hydrus.
I reverted to before #88 but the tests were still failing.
But instead I changed the encoding format of the authentication header as follows:
self.auth_header = {"Authorization": "Basic " + b64encode(b"1:test").decode("ascii")}
and the byte string generated in the auth header matched with that generated while requesting through a web browser i.e. MTp0ZXN0
and then all the tests were passing.
@xadahiya @chrizandr comments on this approach??
from hydrus.
@alohamora this is fine, create a PR. This is actually how authentication works now. Nice work 👎
from hydrus.
Fixed in #115
from hydrus.
Related Issues (20)
- Define and implement a way to set right column types when auto-generating the database HOT 11
- Move all synchronisation functionalities into an extensions module, so to be optional HOT 2
- Add tests for PUT/DELETE request for multiple Class objects in test_app.py
- Change GET PUT POST DELETE requests format for collections HOT 1
- Optimise filtered resource query HOT 1
- Add to the documentation how to handle ApiDoc/schema changes HOT 6
- Foreign key relationship between Collection and managed Class
- Matching done in db_models for datatype needs to be stricter. HOT 3
- Tests for column datatypes in DB Models HOT 2
- Add support for datetime column in hydrus
- Coverage of logging is poor HOT 2
- Host domain is hardcoded to "localhost". Doesn't change after changing hydrus_server_url in deployment
- AttributeError while running setup.py HOT 2
- Update Readme.md HOT 3
- Error when trying to install HOT 2
- Typo in `demo.py` file HOT 2
- Issue in python version > 3.9
- Server is not listening to expected `PORT` and `API_NAME` HOT 1
- `hydrus serve` gives error
- Bruterforce-attack Facebook python
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydrus.