mirror of https://github.com/docker/docker-py.git
Updated unit tests API version, flake8 fixes
This commit is contained in:
parent
156d14efd1
commit
54c904f806
|
|
@ -91,6 +91,7 @@ def encode_auth(auth_info):
|
||||||
return base64.b64encode(auth_info.get('username', '') + b':' +
|
return base64.b64encode(auth_info.get('username', '') + b':' +
|
||||||
auth_info.get('password', ''))
|
auth_info.get('password', ''))
|
||||||
|
|
||||||
|
|
||||||
def decode_auth(auth):
|
def decode_auth(auth):
|
||||||
if isinstance(auth, six.string_types):
|
if isinstance(auth, six.string_types):
|
||||||
auth = auth.encode('ascii')
|
auth = auth.encode('ascii')
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,9 @@ class Client(requests.Session):
|
||||||
# Send the full auth configuration (if any exists), since the build
|
# Send the full auth configuration (if any exists), since the build
|
||||||
# could use any (or all) of the registries.
|
# could use any (or all) of the registries.
|
||||||
if self._auth_configs:
|
if self._auth_configs:
|
||||||
headers['X-Registry-Config'] = auth.encode_full_header(self._auth_configs)
|
headers['X-Registry-Config'] = auth.encode_full_header(
|
||||||
|
self._auth_configs
|
||||||
|
)
|
||||||
|
|
||||||
response = self._post(
|
response = self._post(
|
||||||
u,
|
u,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
CURRENT_VERSION = 'v1.8'
|
CURRENT_VERSION = 'v1.9'
|
||||||
|
|
||||||
FAKE_CONTAINER_ID = '3cc2351ab11b'
|
FAKE_CONTAINER_ID = '3cc2351ab11b'
|
||||||
FAKE_IMAGE_ID = 'e9aa60c60128'
|
FAKE_IMAGE_ID = 'e9aa60c60128'
|
||||||
|
|
|
||||||
|
|
@ -760,8 +760,9 @@ class TestBuildWithAuth(BaseTestCase):
|
||||||
if self.client._version < 1.9:
|
if self.client._version < 1.9:
|
||||||
return
|
return
|
||||||
|
|
||||||
key = 'K4104GON3P4Q6ZUJFZRRC2ZQTBJ5YT0UMZD7TGT7ZVIR8Y05FAH2TJQI6Y90SMIB'
|
k = 'K4104GON3P4Q6ZUJFZRRC2ZQTBJ5YT0UMZD7TGT7ZVIR8Y05FAH2TJQI6Y90SMIB'
|
||||||
self.client.login('quay+fortesting', key, registry='https://quay.io/v1/', email='')
|
self.client.login('quay+fortesting', k, registry='https://quay.io/v1/',
|
||||||
|
email='')
|
||||||
|
|
||||||
script = io.BytesIO('\n'.join([
|
script = io.BytesIO('\n'.join([
|
||||||
'FROM quay.io/quay/teststuff',
|
'FROM quay.io/quay/teststuff',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue