コード例 #1
0
ファイル: test_service.py プロジェクト: tuitang00/nova
 def test_get_by_host_and_binary_raises(self):
     self._test_query('service_get_by_host_and_binary',
                      'get_by_host_and_binary',
                      'fake-host',
                      'fake-binary',
                      db_exception=exception.HostBinaryNotFound(
                          host='fake-host', binary='fake-binary'))
コード例 #2
0
ファイル: test_services.py プロジェクト: ykwon8651/project-e
 def service_get_by_host_binary(context, host, binary):
     for service in services:
         if service['host'] == host and service['binary'] == binary:
             return service
     raise exception.HostBinaryNotFound(host=host, binary=binary)