Best Python code snippet using testcontainers-python_python
test_db_containers.py
Source:test_db_containers.py
...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())50 result = e.execute('select @@servicename')51 for row in result:52 assert row[0] == 'MSSQLSERVER'53 with SqlServerContainer(image, password="1Secure*Password2", dialect=dialect) as mssql:54 e = sqlalchemy.create_engine(mssql.get_connection_url())55 result = e.execute('select @@servicename')56 for row in result:...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!