Explorar o código

Fix alias tests on 1.11

The fix in 8e0458205241f654bb1d75de9babd9880afa7206 caused a regression
when testing against 1.11.

Signed-off-by: Aanand Prasad <[email protected]>
Aanand Prasad %!s(int64=9) %!d(string=hai) anos
pai
achega
949b88fff9
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      tests/acceptance/cli_test.py

+ 2 - 2
tests/acceptance/cli_test.py

@@ -1164,7 +1164,7 @@ class CLITestCase(DockerClientTestCase):
             for _, config in networks.items():
                 # TODO: once we drop support for API <1.24, this can be changed to:
                 # assert config['Aliases'] == [container.short_id]
-                aliases = set(config['Aliases']) - set([container.short_id])
+                aliases = set(config['Aliases'] or []) - set([container.short_id])
                 assert not aliases
 
     @v2_only()
@@ -1184,7 +1184,7 @@ class CLITestCase(DockerClientTestCase):
         for _, config in networks.items():
             # TODO: once we drop support for API <1.24, this can be changed to:
             # assert config['Aliases'] == [container.short_id]
-            aliases = set(config['Aliases']) - set([container.short_id])
+            aliases = set(config['Aliases'] or []) - set([container.short_id])
             assert not aliases
 
         assert self.lookup(container, 'app')