def test_view_annotation_logged_out(self): a = Annotation(user='******', consumer='annotateit', uri='http://example.com', text='This is the annotation text', quote='This is what was annotated', permissions={'read': []}) a.save() res = self.cli.get(url_for('main.view_annotation', id=a.id)) h.assert_equal(401, res.status_code)
def test_view_annotation(self): a = Annotation(user='******', consumer='annotateit', uri='http://example.com', text='This is the annotation text', quote='This is what was annotated') a.save() self.login() res = self.cli.get(url_for('main.view_annotation', id=a.id)) h.assert_in(a['user'], res.data) h.assert_in(a['uri'], res.data) h.assert_in(a['text'], res.data) h.assert_in(a['quote'][:25], res.data)