How to use test_docker_run_oracle method in testcontainers-python

Best Python code snippet using testcontainers-python_python

test_db_containers.py

Source:test_db_containers.py Github

copy

Full Screen

...31 result = e.execute("select version()")32 for row in result:33 assert row[0].startswith('10.6.5')34@pytest.mark.skip(reason="needs oracle client libraries unavailable on Travis")35def test_docker_run_oracle():36 with OracleDbContainer() as oracledb:37 e = sqlalchemy.create_engine(oracledb.get_connection_url())38 result = e.execute("select * from V$VERSION")39 versions = {'Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production',40 'PL/SQL Release 11.2.0.2.0 - Production',41 'CORE\t11.2.0.2.0\tProduction',42 'TNS for Linux: Version 11.2.0.2.0 - Production',43 'NLSRTL Version 11.2.0.2.0 - Production'}44 assert {row[0] for row in result} == versions45def test_docker_run_mssql():46 image = 'mcr.microsoft.com/azure-sql-edge'47 dialect = 'mssql+pymssql'48 with SqlServerContainer(image, dialect=dialect) as mssql:49 e = sqlalchemy.create_engine(mssql.get_connection_url())...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run testcontainers-python automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful