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':' +
|
||||
auth_info.get('password', ''))
|
||||
|
||||
|
||||
def decode_auth(auth):
|
||||
if isinstance(auth, six.string_types):
|
||||
auth = auth.encode('ascii')
|
||||
|
|
|
|||
|
|
@ -370,7 +370,9 @@ class Client(requests.Session):
|
|||
# Send the full auth configuration (if any exists), since the build
|
||||
# could use any (or all) of the registries.
|
||||
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(
|
||||
u,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
CURRENT_VERSION = 'v1.8'
|
||||
CURRENT_VERSION = 'v1.9'
|
||||
|
||||
FAKE_CONTAINER_ID = '3cc2351ab11b'
|
||||
FAKE_IMAGE_ID = 'e9aa60c60128'
|
||||
|
|
|
|||
|
|
@ -760,8 +760,9 @@ class TestBuildWithAuth(BaseTestCase):
|
|||
if self.client._version < 1.9:
|
||||
return
|
||||
|
||||
key = 'K4104GON3P4Q6ZUJFZRRC2ZQTBJ5YT0UMZD7TGT7ZVIR8Y05FAH2TJQI6Y90SMIB'
|
||||
self.client.login('quay+fortesting', key, registry='https://quay.io/v1/', email='')
|
||||
k = 'K4104GON3P4Q6ZUJFZRRC2ZQTBJ5YT0UMZD7TGT7ZVIR8Y05FAH2TJQI6Y90SMIB'
|
||||
self.client.login('quay+fortesting', k, registry='https://quay.io/v1/',
|
||||
email='')
|
||||
|
||||
script = io.BytesIO('\n'.join([
|
||||
'FROM quay.io/quay/teststuff',
|
||||
|
|
|
|||
Loading…
Reference in New Issue