This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This code is launched in the child process. | |
It is also loaded/imported in the main process for AMP protocol to know the | |
available command, arguments and results. | |
Each process will use about 30MB of ram, as this is how much Twisted uses. | |
Having more imports here, will increase the size of the process. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2014 Adi Roiban. | |
# See LICENSE for details. | |
""" | |
Helpers for testing code related to HTTP protocol. | |
""" | |
from __future__ import absolute_import | |
from httplib import HTTPConnection, HTTPSConnection | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from select import error as SelectError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/chevah/server/static/documentation/operation-client/transfers.rst b/chevah/server/static/documentation/operation-client/transfers.rst | |
index 5605264..0322b10 100644 | |
--- a/chevah/server/static/documentation/operation-client/transfers.rst | |
+++ b/chevah/server/static/documentation/operation-client/transfers.rst | |
@@ -310,6 +310,10 @@ The `lowercase` is a simple transformation which will transfer the file | |
using destination file path and file name all in lower case. | |
It takes no options. | |
+.. note:: | |
+ If the remote filesystem is case insensitive and a file with the same |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN CERTIFICATE----- | |
MIICTDCCAbWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJHQjEP | |
MA0GA1UEChMGQ2hldmFoMRIwEAYDVQQLEwlDaGV2YWggQ0ExEjAQBgNVBAMTCUNo | |
ZXZhaCBDQTAeFw0xNjA2MTAyMzA1MDBaFw0zNzA2MTAyMzA1MDBaMEYxCzAJBgNV | |
BAYTAkdCMQ8wDQYDVQQKEwZDaGV2YWgxEjAQBgNVBAsTCUNoZXZhaCBDQTESMBAG | |
A1UEAxMJQ2hldmFoIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDKhnaV | |
43T6EcAc45RYV9/FKk3SxI4tAWw/HGpu02JLvs7BiLz4B8YUyf4IDqw/BtyLKKCx | |
zGw55UWIIokk5zkjp6Y9n3wmbHtJHd9Rwgm4pMibVrxjhY/Idf/3zeSakQBIrXpQ | |
eg53iVmn6bClaiUB1aB4wlskchmT496gZStfBQIDAQABo0owSDAMBgNVHRMEBTAD | |
AQH/MDgGA1UdHwQxMC8wLaAroCmGJ2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9zb21l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def addFileToDropzone(self, driver, css_selector, name, content): | |
""" | |
Trigger a file add with `name` and `content` to Dropzone element at `css_selector`. | |
""" | |
script = """ | |
var dropzone_instance = Dropzone.forElement(css_selector) | |
var new_file = new File(['%s'], '%s', {type: 'application/octet-binary'}) | |
dropzone_instance.addFile(new_file) | |
""" % (content, name) | |
driver.execute_script(script) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flaky(count=3, os_version=None): | |
""" | |
A decorator generator to retry a test if it fails in one of the OS from | |
`os_version`. | |
When `os_version` is None it will retry on any OS. | |
It will not work with any tests. | |
The setUp and tearDown is only called once and not called between |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autopep8 -r -i --ignore E226,E24,W503,E3,E123,E128 | |
----------- | |
1 E272 multiple spaces before keyword | |
2 E211 whitespace before '(' | |
2 E743 ambiguous function definition 'l' | |
2 W191 indentation contains tabs | |
3 E101 indentation contains mixed spaces and tabs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Helpers for testing code related to HTTP Proxy . | |
It provides a context manager for starting the proxy. | |
Copyright (c) 2017 Adi Roiban. | |
License BSD | |
This code is based on HTTP Proxy Server in Python. | |
:copyright: (c) 2013 by Abhinav Singh. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2015 Adi Roiban. | |
# MIT License | |
""" | |
(E)SMTP high level client. | |
""" | |
from email.header import Header | |
from email.mime.application import MIMEApplication | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.utils import formataddr, formatdate, make_msgid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Pdb) result | |
u'/ci-test-site/Shared Documents/v2/no such+\u2603' | |
(Pdb) urllib.quote(result.encode('utf-8'), safe=b'/+') | |
*** UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128) | |
(Pdb) urllib.quote(result.encode('utf-8'), safe=b'+/') | |
'/ci-test-site/Shared%20Documents/v2/no%20such+%E2%98%83' | |
(Pdb) urllib.quote(result.encode('utf-8'), safe=b'/') |