CapPaste: add method to find if a paste is suitable for the backend

Basic support in pastoob added (there is no way yet to change the
default options).
Backends support the "public/private" requirement.
This commit is contained in:
Laurent Bachelier 2011-04-27 00:41:50 +02:00
commit fbd4511ffa
6 changed files with 50 additions and 3 deletions

View file

@ -77,3 +77,8 @@ class PastebinTest(BackendTest):
def test_checkurl(self):
# call with an URL we can't handle with this backend
assert self.backend.get_paste('http://pastealacon.com/1') is None
def test_can_post(self):
assert self.backend.can_post(public=None) > 0
assert self.backend.can_post(public=True) > 0
assert self.backend.can_post(public=False) > 0