should probably run tests first before committing, get out the whips people
This commit is contained in:
Родитель
de9ecc3420
Коммит
c5cfd6fb1a
|
@ -68,13 +68,34 @@ class TestHelpers(test_utils.TestCase):
|
|||
settings = Mock()
|
||||
settings.MAX_CONTRIBUTION = 5
|
||||
|
||||
c = {'LANG': 'en-us', 'APP': amo.FIREFOX, 'settings': settings}
|
||||
request = Mock()
|
||||
request.GET = {'src': 'direct'}
|
||||
|
||||
c = {'LANG': 'en-us', 'APP': amo.FIREFOX, 'settings': settings,
|
||||
'request': request}
|
||||
|
||||
s = contribution(c, a)
|
||||
doc = PyQuery(s)
|
||||
# make sure input boxes are rendered correctly (bug 555867)
|
||||
assert doc('input[name=onetime-amount]').length == 1
|
||||
|
||||
def test_src_retained(self):
|
||||
a = Addon.objects.get(pk=4664)
|
||||
a.suggested_amount = '12'
|
||||
|
||||
settings = Mock()
|
||||
settings.MAX_CONTRIBUTION = 5
|
||||
|
||||
request = Mock()
|
||||
request.GET = {'src': 'direct'}
|
||||
|
||||
c = {'LANG': 'en-us', 'APP': amo.FIREFOX, 'settings': settings,
|
||||
'request': request}
|
||||
|
||||
s = contribution(c, a)
|
||||
doc = PyQuery(s)
|
||||
eq_(doc('input[name=source]').attr('value'), 'direct')
|
||||
|
||||
|
||||
class TestPerformanceNote(test_utils.TestCase):
|
||||
listing = '<div class="performance-note">'
|
||||
|
|
|
@ -1092,7 +1092,7 @@ class TestReview(ReviewBase):
|
|||
# Note: remora url will be to the old version, the diff viewer figures
|
||||
# out the version to compare too.
|
||||
eq_(doc('.files a:last-child').attr('href'),
|
||||
remora_url('/files/browse/%d/1' % self.version.files.all()[0].pk))
|
||||
remora_url('/files/diff/%d/' % self.version.files.all()[0].pk))
|
||||
|
||||
|
||||
class TestReviewPreliminary(ReviewBase):
|
||||
|
|
Загрузка…
Ссылка в новой задаче