Best Python code snippet using localstack_python
test_runtime_configuration.py
Source: test_runtime_configuration.py
...115 )116 }117 @mock.patch.dict(os.environ, CERTIFICATE_ENV)118 def test_selfsigned_certificate_less_mx720(self):119 result = security.get_client_certificates(MXVersion(7.16))120 assert "WebServiceClientCertificates" in result121 @mock.patch.dict(os.environ, CERTIFICATE_ENV)122 def test_selfsigned_certificate_greq_mx720(self):123 result = security.get_client_certificates(MXVersion(7.23))...
https.py
Source: https.py
...9 pki_path = path.join(current_path, 'pki')10 cert_path = path.join(pki_path, domain + '.crt')11 key_path = path.join(pki_path, domain + '.key')12 return cert_path, key_path13async def get_client_certificates(14 domain: str,15 client_cert_config: IdpClientCertConfig16) -> Tuple[str, str]:17 """18 check, if the certificate for the given url is already downloaded19 download the certificate if not already downloaded20 return certificate_path and key_path21 """22 # check if the certificate is already downloaded23 cert_path, key_path = await get_cert_paths(domain)24 if await file_exists(cert_path) and await file_exists(key_path):25 return cert_path, key_path26 cert_data_b64 = client_cert_config.cert27 key_data_b64 = client_cert_config.key28 await decode_write_b64(cert_path, cert_data_b64)29 await decode_write_b64(key_path, key_data_b64)30 return cert_path, key_path31async def get_ca_server_certificates():32 current_path = path.dirname(path.realpath(__file__))33 pki_path = path.join(current_path, 'pki')34 ca_path = path.join(pki_path, 'ca.pem')35 if await file_exists(ca_path):36 return ca_path37 return None38def is_https(url: str):39 parsed_url = parse.urlparse(url)40 return parsed_url.scheme == 'https' or not parsed_url.scheme == 'http'41async def get_https_certificates(url: str, config: IdpDomainConfig):42 if url and is_https(url):43 return await get_client_certificates(44 config.domain, config.client_cert_config)45 return None46async def get_ca_certificates(url: str):47 if url and is_https(url):48 return await get_ca_server_certificates()...
certs.py
Source: certs.py
1import boto32from potteringabout.awsutils.base import Base3from datetime import datetime4class Certs(Base):5 clients = ["acm", "apigateway"]6 resources = []7 def list_certificates(self):8 cert_summaries = self.iterate(9 cr=self.client("acm"),10 func_name="list_certificates",11 attr="CertificateSummaryList"12 )13 certs = []14 for cert_summary in cert_summaries:15 cert = self.client("acm").describe_certificate(16 CertificateArn=cert_summary["CertificateArn"]17 )["Certificate"]18 certs.append(cert)19 return certs20 def list_client_certificates(self):21 return self.iterate(22 cr=self.client("apigateway"),23 func_name="get_client_certificates", 24 attr="items", 25 nextToken="position"26 )...
Check out the latest blogs from LambdaTest on this topic:
The fact is not alien to us anymore that cross browser testing is imperative to enhance your application’s user experience. Enhanced knowledge of popular and highly acclaimed testing frameworks goes a long way in developing a new app. It holds more significance if you are a full-stack developer or expert programmer.
QA testers have a unique role and responsibility to serve the customer. Serving the customer in software testing means protecting customers from application defects, failures, and perceived failures from missing or misunderstood requirements. Testing for known requirements based on documentation or discussion is the core of the testing profession. One unique way QA testers can both differentiate themselves and be innovative occurs when senseshaping is used to improve the application user experience.
Having a good web design can empower business and make your brand stand out. According to a survey by Top Design Firms, 50% of users believe that website design is crucial to an organization’s overall brand. Therefore, businesses should prioritize website design to meet customer expectations and build their brand identity. Your website is the face of your business, so it’s important that it’s updated regularly as per the current web design trends.
Enterprise resource planning (ERP) is a form of business process management software—typically a suite of integrated applications—that assists a company in managing its operations, interpreting data, and automating various back-office processes. The introduction of a new ERP system is analogous to the introduction of a new product into the market. If the product is not handled appropriately, it will fail, resulting in significant losses for the business. Most significantly, the employees’ time, effort, and morale would suffer as a result of the procedure.
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!!