示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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
示例#4
0
 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