Comments (7)
Also, if you use yaml instead of json it will work fine.
from flask-fixtures.
You can try my PR #32 which allows you to disable parsing. Hopefully @croach will merged it soon.
from flask-fixtures.
the parameters will be:
[parameters: {'name': 'Agent', 'uuid': datetime.datetime(2016, 10, 1, 0, 0)}]
from flask-fixtures.
I encountered the same problem, had to precede the number with letters.
Can you tell me why?
from flask-fixtures.
Unfortunately JSONLoader
is trying to automatically parse everything into datetime in flask_fixtures/loaders.py:59
. I didn't find way so far , how to use custom JSONLoader instead of provided one as workaround.
from flask-fixtures.
+1, same issue
from flask-fixtures.
+1
Same problem. It only happens if you have dateutil
installed.
@s7anley Your PR is from 2016, is it going to be merged yet? Anyway, it fixes the problem only partially. In my case I have string fields representing dates and numbers in the same json.
The workaround I found is to use number in those fields, instead of string representing numbers (as they really are in the database). I'll try to come up with yet another solution for this.
from flask-fixtures.
Related Issues (20)
- SQLite gotcha HOT 2
- Add support for standalone test functions
- Missing FixturesMixin HOT 13
- update PyPi docs HOT 1
- Create a better plugin system for fixtures loaders
- Doing per-test fixtures? HOT 2
- Possible issue with bit fields
- Database initialization HOT 1
- Many-to-many issue HOT 1
- Application not registered on db instance and no application bound to current context HOT 7
- class level model didn't work
- py.test seems not to be really supported HOT 3
- PyYAML deprecation warning
- Run fixtures in every test
- Add Flask-Fixtures in conda-forge channel HOT 1
- Keeping fixtures after unit tests
- setUp function not working when decorating individual methods HOT 1
- Add Python 3 compatibility HOT 1
- Add a simple variable replacement templating syntax for fixtures HOT 1
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 flask-fixtures.