2
2
from django .test .utils import override_settings
3
3
4
4
from builds .constants import LATEST
5
- from builds .constants import LATEST_VERBOSE_NAME
6
- from builds .models import Version
7
5
from projects .models import Project
8
6
from redirects .models import Redirect
9
7
@@ -29,9 +27,7 @@ def setUp(self):
29
27
'description' : 'wat' ,
30
28
'documentation_type' : 'sphinx' })
31
29
pip = Project .objects .get (slug = 'pip' )
32
- Version .objects .create (project = pip , identifier = LATEST ,
33
- verbose_name = LATEST_VERBOSE_NAME , slug = LATEST ,
34
- active = True )
30
+ pip .versions .create_latest ()
35
31
36
32
def test_proper_url_no_slash (self ):
37
33
r = self .client .get ('/docs/pip' )
@@ -198,9 +194,7 @@ def setUp(self):
198
194
'description' : 'wat' ,
199
195
'documentation_type' : 'sphinx' })
200
196
self .pip = Project .objects .get (slug = 'pip' )
201
- Version .objects .create (project = self .pip , identifier = LATEST ,
202
- verbose_name = LATEST_VERBOSE_NAME , slug = LATEST ,
203
- active = True )
197
+ self .pip .versions .create_latest ()
204
198
205
199
@override_settings (USE_SUBDOMAIN = True )
206
200
def test_redirect_root (self ):
0 commit comments