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

jwag956 / flask-security / 160
97%

Build:
DEFAULT BRANCH: master
Ran 11 May 2019 07:23PM UTC
Jobs 10
Files 20
Run time 6min
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

pending completion
160

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%)

9.42 hits per line

Jobs
ID Job ID Ran Files Coverage
1 160.1 (REQUIREMENTS=lowest) 11 May 2019 07:23PM UTC 0
94.24
Travis Job 160.1
2 160.2 (REQUIREMENTS=lowest) 11 May 2019 07:24PM UTC 0
94.24
Travis Job 160.2
3 160.3 (REQUIREMENTS=lowest) 11 May 2019 07:23PM UTC 0
94.24
Travis Job 160.3
4 160.4 (REQUIREMENTS=lowest) 11 May 2019 07:24PM UTC 0
94.24
Travis Job 160.4
5 160.5 (REQUIREMENTS=release) 11 May 2019 07:24PM UTC 0
94.24
Travis Job 160.5
6 160.6 (REQUIREMENTS=release) 11 May 2019 07:27PM UTC 0
94.24
Travis Job 160.6
7 160.7 (REQUIREMENTS=release) 11 May 2019 07:27PM UTC 0
94.24
Travis Job 160.7
8 160.8 (REQUIREMENTS=release) 11 May 2019 07:27PM UTC 0
94.24
Travis Job 160.8
9 160.9 (REQUIREMENTS=lowest) 11 May 2019 07:30PM UTC 0
94.24
Travis Job 160.9
10 160.10 (REQUIREMENTS=release) 11 May 2019 07:30PM UTC 0
94.24
Travis Job 160.10
Source Files on build 160
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #160
  • e606a228 on github
  • Prev Build on master (#156)
  • Next Build on master (#163)
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