Skip to content

Commit

Permalink
Add tests to check pending migrations (#1347)
Browse files Browse the repository at this point in the history
* Add tests to check pending migrations

* Add missing migrations
  • Loading branch information
niharika1995 authored and amplifi committed Mar 28, 2017
1 parent 378ea3a commit 65a30ed
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ before_script:
env:
matrix:
- TOX_ENV=py35-flake8
- TOX_ENV=py35-django1.9-migration
- TOX_ENV=py35-django1.9-unit

matrix:
Expand Down
23 changes: 23 additions & 0 deletions cadasta/questionnaires/migrations/0018_add_ordering.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-03-27 14:28
from __future__ import unicode_literals

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('questionnaires', '0017_populate_additional_fields'),
]

operations = [
migrations.AlterModelOptions(
name='question',
options={'ordering': ('index',)},
),
migrations.AlterModelOptions(
name='questiongroup',
options={'ordering': ('index',)},
),
]
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
envlist =
py35-flake8,
py35-django1.9-migration,
py35-django1.9-unit

[testenv]
Expand All @@ -15,6 +16,9 @@ install_command = pip install --find-links https://s3.amazonaws.com:443/cadasta-
[testenv:py35-django1.9-unit]
commands = ./runtests.py

[testenv:py35-django1.9-migration]
commands = python ./cadasta/manage.py makemigrations --check

[testenv:py35-flake8]
commands = ./runtests.py --lint
deps =
Expand Down

0 comments on commit 65a30ed

Please sign in to comment.