Skip to content

Commit

Permalink
tests: add get_or_create
Browse files Browse the repository at this point in the history
Ran the various component tests in get_or_create,
filed and grouped tests that fail due to lack of savepoints
in Cloud Spanner, following Tim's advisory in #384.

Fixes #270
Fixes #384
  • Loading branch information
odeke-em committed Mar 27, 2020
1 parent 28bdff9 commit 35cd64f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
- DJANGO_TEST_APPS="expressions expressions_window"
- DJANGO_TEST_APPS="field_defaults field_subclassing file_storage file_uploads"
- DJANGO_TEST_APPS="fixtures fixtures_model_package from_db_value"
- DJANGO_TEST_APPS="get_earliest_or_latest get_object_or_404"
- DJANGO_TEST_APPS="get_earliest_or_latest get_object_or_404 get_or_create"
- DJANGO_TEST_APPS="i18n"
- DJANGO_TEST_APPS="indexes inline_formsets introspection invalid_models_tests"
- DJANGO_TEST_APPS="known_related_objects lookup max_lengths m2m_and_m2o m2m_intermediary m2m_multiple"
Expand Down
10 changes: 9 additions & 1 deletion django_spanner/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,16 @@ class DatabaseFeatures(BaseDatabaseFeatures):
'cache.tests.CreateCacheTableForDBCacheTests',
'cache.tests.DBCacheTests',
'cache.tests.DBCacheWithTimeZoneTests',
# A rollback failed and should be investigated:
# Tests that require savepoints.
# https://github.com/orijtech/django-spanner/issues/299
'get_or_create.tests.GetOrCreateTests.test_get_or_create_invalid_params',
'get_or_create.tests.GetOrCreateTestsWithManualPKs.test_create_with_duplicate_primary_key',
'get_or_create.tests.GetOrCreateTestsWithManualPKs.test_get_or_create_raises_IntegrityError_plus_traceback', # noqa
'get_or_create.tests.GetOrCreateTestsWithManualPKs.test_savepoint_rollback',
'get_or_create.tests.GetOrCreateThroughManyToMany.test_something',
'get_or_create.tests.UpdateOrCreateTests.test_integrity',
'get_or_create.tests.UpdateOrCreateTests.test_manual_primary_key_test',
'get_or_create.tests.UpdateOrCreateTestsWithManualPKs.test_create_with_duplicate_primary_key',
'test_utils.tests.TestBadSetUpTestData.test_failure_in_setUpTestData_should_rollback_transaction',
# Spanner doesn't support views.
'inspectdb.tests.InspectDBTransactionalTests.test_include_views',
Expand Down

0 comments on commit 35cd64f

Please sign in to comment.