def test_publish_fails_for_invalid_auth(self): sess = Session(client=app.test_client()) sess.register('testuser', 'testpassword') sess.use_doc('test_cow') sess2 = Session(client=app.test_client()) sess2.register('testuser2', 'testpassword') sess2.docid = sess.docid self.assertRaises(Exception, sess2.publish)
def test_publish_fails_for_invalid_auth(self): sess = TestSession(client=app.test_client()) sess.register('testuser', 'testpassword') sess.use_doc('test_cow') sess2 = TestSession(client=app.test_client()) sess2.register('testuser2', 'testpassword') sess2.docid = sess.docid self.assertRaises(Exception, sess2.publish)