示例#1
0
 def setup(self):
     self.permissions = dict(
         read=[self.gooduser, self.updateuser],
         update=[self.gooduser, self.updateuser],
         admin=[self.gooduser])
     kwargs = dict(
         id=self.anno_id,
         text=u"Foo",
         permissions=self.permissions
         )
     ann = Annotation(**kwargs)
     ann.save()
     self.app = app.test_client()
示例#2
0
 def setup(self):
     app.config['AUTH_ON'] = True
     self.app = app.test_client()
示例#3
0
 def setup(self):
     app.config['AUTH_ON'] = False
     assert app.config['MOUNTPOINT'] == '', "MOUNTPOINT config option is incorrect for tests. should be ''"
     self.app = app.test_client()
     self.account_id = 'testing-user'
     self.headers = {'x-annotator-account-id': self.account_id}