"Fossies" - the Fresh Open Source Software Archive

Member "keystone-17.0.0/keystone/tests/unit/test_healthcheck.py" (13 May 2020, 922 Bytes) of package /linux/misc/openstack/keystone-17.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "test_healthcheck.py": 16.0.1_vs_17.0.0.

    1 #
    2 # Licensed under the Apache License, Version 2.0 (the "License");
    3 # you may not use this file except in compliance with the License.
    4 # You may obtain a copy of the License at
    5 #
    6 #    http://www.apache.org/licenses/LICENSE-2.0
    7 #
    8 # Unless required by applicable law or agreed to in writing, software
    9 # distributed under the License is distributed on an "AS IS" BASIS,
   10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
   11 # implied.
   12 # See the License for the specific language governing permissions and
   13 # limitations under the License.
   14 
   15 import http.client
   16 
   17 from keystone.tests.unit import rest
   18 
   19 
   20 class HealthCheckTestCase(rest.RestfulTestCase):
   21     def test_get_healthcheck(self):
   22         with self.test_client() as c:
   23             resp = c.get('/healthcheck', expected_status_code=http.client.OK)
   24             # healthcheck is not supposed to return any data
   25             self.assertEqual(0, resp.content_length)