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 1
1
language : python
2
2
python :
3
3
- " 2.7"
4
- - " 3.3"
5
4
- " 3.4"
5
+ - " 3.5"
6
6
env :
7
7
- DJANGO=1.7
8
8
- DJANGO=1.8
9
+ - DJANGO=1.9
10
+ matrix :
11
+ exclude :
12
+ - python : " 3.5"
13
+ env : DJANGO=1.7
9
14
install :
10
15
- pip install -q Django==$DJANGO
11
16
- pip install coverage
Original file line number Diff line number Diff line change 2
2
import random
3
3
4
4
5
- __version__ = '0.1.5 '
5
+ __version__ = '0.1.6 '
6
6
7
7
8
8
class Seed (object ):
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def guess_format(self, field):
75
75
faker = self .faker
76
76
provider = self .provider
77
77
78
- if django .VERSION [1 ] = = 8 :
78
+ if django .VERSION [1 ] > = 8 :
79
79
if isinstance (field , DurationField ):
80
80
return lambda x : provider .duration ()
81
81
if isinstance (field , UUIDField ):
Original file line number Diff line number Diff line change 7
7
import django
8
8
9
9
from 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
11
14
from django .core .management import call_command
12
15
13
16
@@ -59,7 +62,7 @@ class Action(models.Model):
59
62
target = models .ForeignKey (Player , related_name = 'enemy_actions+' , null = True )
60
63
61
64
62
- class SeederTestCase (unittest . TestCase ):
65
+ class SeederTestCase (TestCase ):
63
66
64
67
def test_population (self ):
65
68
faker = fake
@@ -144,7 +147,7 @@ def test_no_entities_added(self):
144
147
self .assertTrue (isinstance (e , SeederException ))
145
148
146
149
147
- class APISeedTestCase (unittest . TestCase ):
150
+ class APISeedTestCase (TestCase ):
148
151
149
152
def setUp (self ):
150
153
self .seed1 = Seed ()
@@ -181,7 +184,7 @@ def test_faker_cache_seeder(self):
181
184
self .assertIs (seeder1 , seeder2 )
182
185
183
186
184
- class SeedCommandTestCase (unittest . TestCase ):
187
+ class SeedCommandTestCase (TestCase ):
185
188
186
189
def test_seed_command (self ):
187
190
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):
48
48
'Programming Language :: Python :: 2.7' ,
49
49
'Programming Language :: Python :: 3' ,
50
50
'Programming Language :: Python :: 3.2' ,
51
- 'Programming Language :: Python :: 3.3' ,
52
51
'Programming Language :: Python :: 3.4' ,
52
+ 'Programming Language :: Python :: 3.5' ,
53
53
'Topic :: Software Development :: Libraries :: Python Modules' ,
54
54
'Topic :: Software Development :: Testing' ,
55
55
'Topic :: Utilities' ,
You can’t perform that action at this time.
0 commit comments