This repository was archived by the owner on Jun 12, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55'Url mappings for accounts app'
66
7- from django .conf .urls . defaults import patterns
7+ from django .conf .urls import patterns
88
99urlpatterns = patterns ('accounts.views' ,
1010 (r'^login' , 'login' ),
Original file line number Diff line number Diff line change 1414from django .utils import simplejson as json
1515from django .contrib .auth .views import login as django_login
1616from forms import AuthenticationForm
17- from lib .auth .backends import AUTHENTICATION_SERVER_ERRORS
17+ try :
18+ from lib .auth .backends import AUTHENTICATION_SERVER_ERRORS
19+ except ImportError :
20+ # we don't have ldap installed, let's not catch any ldap errors
21+ AUTHENTICATION_SERVER_ERRORS = tuple ()
1822from session_csrf import anonymous_csrf
1923
2024
Original file line number Diff line number Diff line change 55'''URL mappings for the bugsy application.
66'''
77
8- from django .conf .urls . defaults import patterns
8+ from django .conf .urls import patterns
99
1010urlpatterns = patterns ('bugsy.views' ,
1111 (r'^$' , 'index' ),
Original file line number Diff line number Diff line change 55'''URL mappings for the l10n_site integration pages.
66'''
77
8- from django .conf .urls . defaults import patterns
8+ from django .conf .urls import patterns
99
1010urlpatterns = patterns ('homepage.views' ,
1111 (r'^$' , 'index' ),
Original file line number Diff line number Diff line change 55'''URL mappings for l10nstats application.
66'''
77
8- from django .conf .urls . defaults import patterns
8+ from django .conf .urls import patterns
99
1010urlpatterns = patterns ('l10nstats.views' ,
1111 (r'^$' , 'index' ),
Original file line number Diff line number Diff line change 55'''URL mappings for the privacy app.
66'''
77
8- from django .conf .urls . defaults import patterns
8+ from django .conf .urls import patterns
99
1010urlpatterns = patterns ('privacy.views' ,
1111 (r'^(?P<id>\d+)?$' , 'show_policy' ),
Original file line number Diff line number Diff line change 22# License, v. 2.0. If a copy of the MPL was not distributed with this
33# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44
5- from django .conf .urls . defaults import patterns
5+ from django .conf .urls import patterns
66
77urlpatterns = patterns ('pushes.views' ,
88 (r'^pushes/(?P<repo_name>.+)?$' , 'pushlog' ),
Original file line number Diff line number Diff line change @@ -629,8 +629,40 @@ def test_5_pushes_3rd_rejected_4th_pending(self):
629629 self .av ,
630630 count = 1
631631 )
632- eq_ (len (pushes ), 3 )
632+ eq_ (len (pushes ), 4 )
633+
634+ # the last (aka. first) one should have a signoff with an
635+ # action on that is rejected
636+ eq_ (pushes [- 2 ]['signoffs' ][0 ]['action' ].flag , Action .REJECTED )
637+
638+ def test_5_pushes_1st_pending (self ):
639+ view = SignoffView ()
640+ flags , actions = self ._get_flags_and_actions ()
641+
642+ # make a pending signoff on the 1st push
643+ signoff = Signoff .objects .create (
644+ push = self .pushes [0 ],
645+ appversion = self .av ,
646+ author = self .axel ,
647+ locale = self .locale ,
648+ )
649+ Action .objects .create (
650+ signoff = signoff ,
651+ flag = Action .PENDING ,
652+ author = self .peter ,
653+ )
654+
655+ flags , actions = self ._get_flags_and_actions ()
656+ pushes , suggested_signoff = view .annotated_pushes (
657+ actions ,
658+ flags ,
659+ None , # notice, no fallback
660+ self .locale ,
661+ self .av ,
662+ count = 1
663+ )
664+ eq_ (len (pushes ), 5 )
633665
634666 # the last (aka. first) one should have a signoff with an
635667 # action on that is rejected
636- eq_ (pushes [- 1 ]['signoffs' ][0 ]['action' ].flag , Action .REJECTED )
668+ eq_ (pushes [- 1 ]['signoffs' ][0 ]['action' ].flag , Action .PENDING )
Original file line number Diff line number Diff line change @@ -556,6 +556,17 @@ def get_query(content):
556556 eq_ (response .status_code , 200 )
557557 eq_ (get_query (response .content ), 'av=%s' % appver .code )
558558
559+ appver2 = AppVersion .objects .create (
560+ app = appver .app ,
561+ version = '2' ,
562+ code = 'fx2' ,
563+ codename = 'foxier'
564+ )
565+ response = self .client .get (url , {'av' : [appver .code , appver2 .code ]})
566+ eq_ (response .status_code , 200 )
567+ eq_ (get_query (response .content ),
568+ 'av=%s&av=%s' % (appver .code , appver2 .code ))
569+
559570 # combine them all
560571 data = {
561572 'locale' : ['en-US' , 'ta' ],
Original file line number Diff line number Diff line change 55'''URL mappings for the shipping app.
66'''
77
8- from django .conf .urls . defaults import patterns
8+ from django .conf .urls import patterns
99
1010urlpatterns = patterns ('shipping.views' ,
1111 (r'^/?$' , 'index' ),
You can’t perform that action at this time.
0 commit comments