Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.

Commit 9832b94

Browse files
committed
Merge branch 'release/2013-05-27'
2 parents 1631e4a + cfaabe9 commit 9832b94

15 files changed

Lines changed: 96 additions & 37 deletions

File tree

apps/accounts/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
'Url mappings for accounts app'
66

7-
from django.conf.urls.defaults import patterns
7+
from django.conf.urls import patterns
88

99
urlpatterns = patterns('accounts.views',
1010
(r'^login', 'login'),

apps/accounts/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
from django.utils import simplejson as json
1515
from django.contrib.auth.views import login as django_login
1616
from 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()
1822
from session_csrf import anonymous_csrf
1923

2024

apps/bugsy/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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

1010
urlpatterns = patterns('bugsy.views',
1111
(r'^$', 'index'),

apps/homepage/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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

1010
urlpatterns = patterns('homepage.views',
1111
(r'^$', 'index'),

apps/l10nstats/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'''URL mappings for l10nstats application.
66
'''
77

8-
from django.conf.urls.defaults import patterns
8+
from django.conf.urls import patterns
99

1010
urlpatterns = patterns('l10nstats.views',
1111
(r'^$', 'index'),

apps/privacy/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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

1010
urlpatterns = patterns('privacy.views',
1111
(r'^(?P<id>\d+)?$', 'show_policy'),

apps/pushes/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

77
urlpatterns = patterns('pushes.views',
88
(r'^pushes/(?P<repo_name>.+)?$', 'pushlog'),

apps/shipping/tests/test_signoff.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

apps/shipping/tests/test_views.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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'],

apps/shipping/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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

1010
urlpatterns = patterns('shipping.views',
1111
(r'^/?$', 'index'),

0 commit comments

Comments
 (0)