Fix templatetag, #1077.
This commit is contained in:
parent
3d19ae7db2
commit
c34b407945
2
fabfile.py
vendored
2
fabfile.py
vendored
@ -25,7 +25,7 @@ def coverage_report_plain():
|
||||
Runs all tests and prints the coverage report.
|
||||
"""
|
||||
test()
|
||||
local('coverage report -m --fail-under=73')
|
||||
local('coverage report -m --fail-under=75')
|
||||
|
||||
|
||||
def coverage():
|
||||
|
@ -44,10 +44,10 @@ def absolute_url(model, link=None):
|
||||
|
||||
Example: {{ motion|absolute_url:'delete' }}
|
||||
"""
|
||||
try:
|
||||
if link is None:
|
||||
url = model.get_absolute_url()
|
||||
else:
|
||||
try:
|
||||
url = model.get_absolute_url(link)
|
||||
except ValueError:
|
||||
url = ''
|
||||
|
@ -91,6 +91,14 @@ class TestMotionDetailView(MotionViewTestCase):
|
||||
response = self.staff_client.get('/motion/1/')
|
||||
self.assertContains(response, '100.00 %')
|
||||
|
||||
def test_deleted_supporter(self):
|
||||
config['motion_min_supporters'] = 1
|
||||
self.motion1.support(self.registered)
|
||||
self.assertContains(self.admin_client.get('/motion/1/'), 'registered')
|
||||
self.registered.delete()
|
||||
self.assertNotContains(self.admin_client.get('/motion/1/'), 'registered')
|
||||
self.assertContains(self.admin_client.get('/motion/1/'), 'empty')
|
||||
|
||||
|
||||
class TestMotionDetailVersionView(MotionViewTestCase):
|
||||
def test_get(self):
|
||||
|
Loading…
Reference in New Issue
Block a user