Skip to content

Commit

Permalink
Try to fix non-determinism in tests (#856)
Browse files Browse the repository at this point in the history
* Try to fix non-determinism in tests

* Rename migration
  • Loading branch information
ian-ross authored and oliverroick committed Oct 25, 2016
1 parent ba09889 commit 40e134d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cadasta/resources/migrations/0004_add_ordering_for_resources.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-10-20 16:48
from __future__ import unicode_literals

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('resources', '0003_spatialresource'),
]

operations = [
migrations.AlterModelOptions(
name='resource',
options={'ordering': ('name',)},
),
migrations.AlterModelOptions(
name='spatialresource',
options={'ordering': ('name',)},
),
]
3 changes: 3 additions & 0 deletions cadasta/resources/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class Resource(RandomIDModel):

history = HistoricalRecords()

class Meta:
ordering = ('name',)

class TutelaryMeta:
perm_type = 'resource'
path_fields = ('project', 'pk')
Expand Down

0 comments on commit 40e134d

Please sign in to comment.