def test_show_staticapp_with_resourcegroup(self): self.staticapp_client.get_static_site.return_value = self.app1 response = show_staticsite(self.mock_cmd, self.name1, self.rg1) self.staticapp_client.get_static_site.assert_called_once_with( self.rg1, self.name1) self.assertEqual(self.app1, response)
def test_show_staticapp_not_exist(self): self.staticapp_client.get_static_site.return_value = self.app1 self.staticapp_client.list.return_value = [self.app1, self.app2] with self.assertRaises(CLIError): show_staticsite(self.mock_cmd, self.name1_not_exist)