CapPaste: Also check the title in can_post
Because unsurprisingly pastealacon has silly restrictions.
This commit is contained in:
parent
0d2148bd84
commit
dd6864c2c4
4 changed files with 18 additions and 10 deletions
|
|
@ -82,12 +82,12 @@ class PastealaconTest(BackendTest):
|
|||
|
||||
def test_can_post(self):
|
||||
assert 0 == self.backend.can_post('hello', public=False)
|
||||
assert 1 == self.backend.can_post('hello', public=True)
|
||||
assert 1 <= self.backend.can_post('hello', public=True)
|
||||
assert 0 == self.backend.can_post('hello', public=True, max_age=600)
|
||||
assert 1 == self.backend.can_post('hello', public=True, max_age=3600*24)
|
||||
assert 1 == self.backend.can_post('hello', public=True, max_age=3600*24*3)
|
||||
assert 1 == self.backend.can_post('hello', public=True, max_age=False)
|
||||
assert 1 == self.backend.can_post('hello', public=None, max_age=False)
|
||||
assert 1 == self.backend.can_post('hello', public=True, max_age=3600*24*40)
|
||||
assert 1 == self.backend.can_post(u'héhé', public=True)
|
||||
assert 1 <= self.backend.can_post('hello', public=True, max_age=3600*24)
|
||||
assert 1 <= self.backend.can_post('hello', public=True, max_age=3600*24*3)
|
||||
assert 1 <= self.backend.can_post('hello', public=True, max_age=False)
|
||||
assert 1 <= self.backend.can_post('hello', public=None, max_age=False)
|
||||
assert 1 <= self.backend.can_post('hello', public=True, max_age=3600*24*40)
|
||||
assert 1 <= self.backend.can_post(u'héhé', public=True)
|
||||
assert 0 == self.backend.can_post(u'hello ♥', public=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue