Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
62a9dd61
Commit
62a9dd61
authored
8 years ago
by
Ben Patterson
Browse files
Options
Downloads
Patches
Plain Diff
Ensure makemigrations test is called.
parent
6b40e6f2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/util/tests/test_db.py
+5
-3
5 additions, 3 deletions
common/djangoapps/util/tests/test_db.py
with
5 additions
and
3 deletions
common/djangoapps/util/tests/test_db.py
+
5
−
3
View file @
62a9dd61
...
...
@@ -4,14 +4,13 @@ import ddt
import
threading
import
time
import
unittest
from
unittest
import
skipIf
from
django.contrib.auth.models
import
User
from
django.core.management
import
call_command
from
django.conf
import
settings
from
django.db
import
connection
,
IntegrityError
from
django.db.transaction
import
atomic
,
TransactionManagementError
from
django.test
import
TestCase
,
TransactionTestCase
from
django.test.utils
import
override_settings
from
util.db
import
(
commit_on_success
,
enable_named_outer_atomic
,
outer_atomic
,
generate_int_id
,
NoOpMigrationModules
...
...
@@ -215,11 +214,14 @@ class MigrationTests(TestCase):
"""
Tests for migrations.
"""
@
skipIf
(
isinstance
(
settings
.
MIGRATION_MODULES
,
NoOpMigrationModules
),
'
Skip in case of NoOpMigrationModules
'
)
@
override_
settings
(
MIGRATION_MODULES
=
{}
)
def
test_migrations_are_in_sync
(
self
):
"""
Tests that the migration files are in sync with the models.
If this fails, you needs to run the Django command makemigrations.
The test is set up to override MIGRATION_MODULES to ensure migrations are
enabled for purposes of this test regardless of the overall test settings.
"""
with
self
.
assertRaises
(
SystemExit
):
call_command
(
'
makemigrations
'
,
'
-e
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment