diff options
| author | Paul McMillan <Paul@McMillan.ws> | 2010-07-06 23:27:34 +0000 |
|---|---|---|
| committer | Paul McMillan <Paul@McMillan.ws> | 2010-07-06 23:27:34 +0000 |
| commit | ae2c227f51b86c2644cf0ca76a1b5b6e53307e17 (patch) | |
| tree | 34acd6277a5d7321c8bb084d86c6988a4c5e992b | |
| parent | 90fab13583224a69490b5ef67b086d7ef4d2bb14 (diff) | |
[soc2010/test-refactor] Fixed @skipIfDBEngine to be more explicit
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/test-refactor@13427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/test/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index 453ee3bf94..5acbe60431 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -88,5 +88,7 @@ def skipIfDBEngine(engine, reason=None): """ if not reason: reason = "not supported on this database" - return skipIf(settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] in engine, - reason) + settings_engine = settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] + if isinstance(engine, basestring): + return skipIf(settings_engine == engine, reason) + return skipIf(settings_engine in engine, reason) |
