parent
404cf0c872
commit
f8dd6349c1
|
@ -0,0 +1 @@
|
|||
Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text".
|
|
@ -65,7 +65,7 @@ def create_new_paste(contents):
|
|||
from urllib.request import urlopen
|
||||
from urllib.parse import urlencode
|
||||
|
||||
params = {"code": contents, "lexer": "python3", "expiry": "1week"}
|
||||
params = {"code": contents, "lexer": "text", "expiry": "1week"}
|
||||
url = "https://bpaste.net"
|
||||
try:
|
||||
response = (
|
||||
|
|
|
@ -165,7 +165,7 @@ class TestPaste:
|
|||
assert len(mocked_urlopen) == 1
|
||||
url, data = mocked_urlopen[0]
|
||||
assert type(data) is bytes
|
||||
lexer = "python3"
|
||||
lexer = "text"
|
||||
assert url == "https://bpaste.net"
|
||||
assert "lexer=%s" % lexer in data.decode()
|
||||
assert "code=full-paste-contents" in data.decode()
|
||||
|
|
Loading…
Reference in New Issue