• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jwag956 / flask-security / 160 / 6
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 11 May 2019 07:27PM UTC
Files 20
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2019 07:20PM UTC coverage: 94.244% (+0.07%) from 94.173%
REQUIREMENTS=release

push

travis-ci

web-flow
bugfix(datastore) Fix get_user for various DBs (#73)

DB drivers vary in how strict they are. For example
postgres+pyscopg2 throws errors if you attempt to lower(<integer>) or
compare a string field with an integer field.
Furthermore, when pyscopg2 throws an internal error like that, it
aborts the transaction - so you can't just try another query.

To solve this - in get_user we check for compatibility of types using
metadata that the ORM provides. This isn't trying to be completely
general - just looking at numeric and non-numeric types - on the
presumption that we would have unique user attributes on things like
dates, boolean, etc!.

To enable testing, added an option to pytest to specify a real DB
url to replace the default sqlite. This required a bit of refactoring
and realized that we really shouldn't be passing in fixtures to
the datastore() fixture since that meant all 5 datastores would be
instantiated EVERY time - which for a real DB was a performance issue.

With this addition - tested Sqlalchemy, peewee, pony with sqlite,
postgres, mysql.

1408 of 1494 relevant lines covered (94.24%)

0.94 hits per line

Source Files on job 160.6 (REQUIREMENTS=release)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 141
  • Travis Job 160.6
  • e606a228 on github
  • Prev Job for REQUIREMENTS=release on master (#156.5)
  • Next Job for REQUIREMENTS=release on master (#163.5)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc