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)
def test_publish(self): sess = Session(client=app.test_client()) sess.register('testuser', 'testpassword') sess.use_doc('test_cow') sess.publish() doc = Doc.load(bokeh_app.servermodel_storage, sess.docid) assert doc.title == 'test_cow' assert doc.published == True
def test_publish(self): sess = TestSession(client=app.test_client()) sess.register('testuser', 'testpassword') sess.use_doc('test_cow') sess.publish() doc = Doc.load(bokeh_app.servermodel_storage, sess.docid) assert doc.title == 'test_cow' assert doc.published == True