Best Python code snippet using tempest_python
test_servers_client.py
Source:test_servers_client.py
...556 status=202,557 server_id=self.server_id558 )559 def test_migrate_server_with_str_body(self):560 self._test_migrate_server()561 def test_migrate_server_with_bytes_body(self):562 self._test_migrate_server(True)563 def _test_migrate_server(self, bytes_body=False):564 self.check_service_client_function(565 self.client.migrate_server,566 'tempest.lib.common.rest_client.RestClient.post',567 {},568 status=202,569 server_id=self.server_id570 )571 def test_lock_server_with_str_body(self):572 self._test_lock_server()573 def test_lock_server_with_bytes_body(self):574 self._test_lock_server(True)575 def _test_lock_server(self, bytes_body=False):576 self.check_service_client_function(577 self.client.lock_server,...
test_server.py
Source:test_server.py
...50 self.assert_is_reachable()51 @pytest.mark.server_migrate52 @nova.skip_if_missing_hypervisors(count=2)53 def test_4_migrate_server(self):54 self._test_migrate_server(live=False)55 @pytest.mark.server_migrate56 @nova.skip_if_missing_hypervisors(count=2)57 def test_5_live_migrate_server(self):58 self._test_migrate_server(live=True)59 @pytest.mark.server_migrate60 @nova.skip_if_missing_hypervisors(count=2)61 def test_6_migrate_server_with_host(self):62 """Tests cold migration actually ends on target hypervisor63 """64 self._test_migrate_server_with_host(live=False)65 @pytest.mark.server_migrate66 @nova.skip_if_missing_hypervisors(count=2)67 def test_7_live_migrate_server_with_host(self):68 self._test_migrate_server_with_host(live=True)69 @pytest.mark.server_migrate70 @nova.skip_if_missing_hypervisors(count=2)71 def test_8_live_migrate_server_with_block_migration(self):72 self._test_migrate_server(live=True, block_migration=True)73 @pytest.mark.server_migrate74 @nova.skip_if_missing_hypervisors(count=2)75 def test_9_live_migrate_server_with_no_block_migration(self):76 self._test_migrate_server(live=True, block_migration=False)77 def _test_migrate_server(self,78 live: bool,79 block_migration: bool = None):80 """Tests cold migration actually changes hypervisor81 """82 server = self.ensure_server(status='ACTIVE')83 initial_hypervisor = nova.get_server_hypervisor(server)84 server = self.migrate_server(live=live,85 block_migration=block_migration)86 final_hypervisor = nova.get_server_hypervisor(server)87 self.assertNotEqual(initial_hypervisor, final_hypervisor)88 def _test_migrate_server_with_host(self,89 live: bool):90 """Tests cold migration actually ends on target hypervisor91 """...
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!!