def testCreatePaste(self): title = "paste created in tests" language = "text" content = "blah blah blah this is a paste" pasteResponse = phlcon_paste.create_paste(self.conduit, content, title, language) self.assertEqual(pasteResponse.content, content) self.assertEqual(pasteResponse.title, title) self.assertEqual(pasteResponse.language, language)
def process(args): conduit = phlsys_makeconduit.make_conduit(args.uri, args.user, args.cert, args.act_as_user) if args.text: text = args.text elif args.text_file: text = args.text_file.read() else: print("error: you have not specified any content for the paste") sys.exit(1) result = phlcon_paste.create_paste(conduit, text, args.title, args.language) print(result.uri if not args.format_id else result.id)
def process(args): conduit = phlsys_makeconduit.make_conduit( args.uri, args.user, args.cert, args.act_as_user) if args.text: text = args.text elif args.text_file: text = args.text_file.read() else: print "error: you have not specified any content for the paste" sys.exit(1) result = phlcon_paste.create_paste( conduit, text, args.title, args.language) print result.uri if not args.format_id else result.id