Skip to content

Commit aa989c8

Browse files
committed
Remove inheritance from deprecated container.
1 parent 55267cb commit aa989c8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

testcontainers/google/pubsub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
# License for the specific language governing permissions and limitations
1212
# under the License.
1313

14-
from ..core.generic import GenericContainer
14+
from ..core.container import DockerContainer
1515

1616

17-
class PubSubContainer(GenericContainer):
17+
class PubSubContainer(DockerContainer):
1818
"""
1919
PubSub container for testing managed message queues.
2020

tests/test_new_docker_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from testcontainers import mysql
66

7-
from testcontainers.core.generic import GenericContainer
7+
from testcontainers.core.container import DockerContainer
88
from importlib import reload
99

1010

@@ -14,7 +14,7 @@ def setup_module(m):
1414

1515

1616
def test_docker_custom_image():
17-
container = GenericContainer("mysql:5.7.17")
17+
container = DockerContainer("mysql:5.7.17")
1818
container.with_exposed_ports(3306)
1919
container.with_env("MYSQL_ROOT_PASSWORD", "root")
2020

@@ -36,10 +36,10 @@ def test_docker_env_variables():
3636

3737
def test_docker_kwargs():
3838
code_dir = Path(__file__).parent
39-
container_first = GenericContainer("nginx:latest")
39+
container_first = DockerContainer("nginx:latest")
4040
container_first.with_volume_mapping(code_dir, '/code')
4141

42-
container_second = GenericContainer("nginx:latest")
42+
container_second = DockerContainer("nginx:latest")
4343

4444
with container_first:
4545
container_second.with_kwargs(volumes_from=[container_first._container.short_id])

0 commit comments

Comments
 (0)