Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for bugfixes provided in PRs # 33 and #34 #35

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Tests for bugfixes provided in PRs # 33 and #34 #35

wants to merge 5 commits into from

Conversation

ashald
Copy link
Contributor

@ashald ashald commented Oct 6, 2013

Includes:

  1. 2 new tests;
  2. Bugfix for 'johnny.tests.base.py#supports_transactions' function;
  3. Removed unused & broken method 'johnny.tests.cache.MultiDbTest#_other'
  4. Removed trailing spaces in test files

ashald added 5 commits October 5, 2013 16:17
Function was broken since con.features.__dict__.get() isn't guaranteed that it will get real feature value. For example, 'django.db.backends.BaseDatabaseFeatures#supports_transactions' is implemented as a 'cached_property'. The 'cached_property' decorator is implemented as a descriptor that replaces itself on the instance with computed value after first call - it means that prior to first call instance it is attached to has no value for target field.

TL;DR: Added support for feature fields based on descriptors.
…on does not re-raises exception that caused this method being called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant