File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 11language : python
22python :
33 - " 2.7"
4- - " 3.3"
54 - " 3.4"
5+ - " 3.5"
66env :
77 - DJANGO=1.7
88 - DJANGO=1.8
9+ - DJANGO=1.9
10+ matrix :
11+ exclude :
12+ - python : " 3.5"
13+ env : DJANGO=1.7
914install :
1015 - pip install -q Django==$DJANGO
1116 - pip install coverage
Original file line number Diff line number Diff line change 22import random
33
44
5- __version__ = '0.1.5 '
5+ __version__ = '0.1.6 '
66
77
88class Seed (object ):
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def guess_format(self, field):
7575 faker = self .faker
7676 provider = self .provider
7777
78- if django .VERSION [1 ] = = 8 :
78+ if django .VERSION [1 ] > = 8 :
7979 if isinstance (field , DurationField ):
8080 return lambda x : provider .duration ()
8181 if isinstance (field , UUIDField ):
Original file line number Diff line number Diff line change 77import django
88
99from django .db import models
10- from django .utils import unittest
10+ try :
11+ from django .utils .unittest import TestCase
12+ except :
13+ from django .test import TestCase
1114from django .core .management import call_command
1215
1316
@@ -59,7 +62,7 @@ class Action(models.Model):
5962 target = models .ForeignKey (Player , related_name = 'enemy_actions+' , null = True )
6063
6164
62- class SeederTestCase (unittest . TestCase ):
65+ class SeederTestCase (TestCase ):
6366
6467 def test_population (self ):
6568 faker = fake
@@ -144,7 +147,7 @@ def test_no_entities_added(self):
144147 self .assertTrue (isinstance (e , SeederException ))
145148
146149
147- class APISeedTestCase (unittest . TestCase ):
150+ class APISeedTestCase (TestCase ):
148151
149152 def setUp (self ):
150153 self .seed1 = Seed ()
@@ -181,7 +184,7 @@ def test_faker_cache_seeder(self):
181184 self .assertIs (seeder1 , seeder2 )
182185
183186
184- class SeedCommandTestCase (unittest . TestCase ):
187+ class SeedCommandTestCase (TestCase ):
185188
186189 def test_seed_command (self ):
187190 call_command ('seed' , 'django_seed' , number = 10 )
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ def find_version(*file_paths):
4848 'Programming Language :: Python :: 2.7' ,
4949 'Programming Language :: Python :: 3' ,
5050 'Programming Language :: Python :: 3.2' ,
51- 'Programming Language :: Python :: 3.3' ,
5251 'Programming Language :: Python :: 3.4' ,
52+ 'Programming Language :: Python :: 3.5' ,
5353 'Topic :: Software Development :: Libraries :: Python Modules' ,
5454 'Topic :: Software Development :: Testing' ,
5555 'Topic :: Utilities' ,
You can’t perform that action at this time.
0 commit comments