The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: I7b97fab683e45118327b93c776f8c487feab7374
The versions resource constructs the links by using application_url,
but it's possible that the API endpoint is behind a load balancer
or SSL terminator. This means that the application_url might be
incorrect. This fix provides a config option (similar to other
services) which lets us override the host URL when constructing
links for the versions API.
Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com>
Change-Id: I23f06c6c2d52ba46c74e0d097c4963d2de731d30
Closes-bug: 1384379
At the time of test setup, repeat the definition of the several
variables, and does not change the contents of the variable in a
method, they can be declared as global variables to the to simplify
the setup
Close-Bug: #1621464
Change-Id: I9c00c17e85c591671e0a104c004d6465b7bbb72a
In some cases, assertTrue(observed == expected) was used
instead of assertEqual(expected, observed), which is a
better way to test equality
Change-Id: I1b966e93f3a992b2e04f9e52242ba154367da25c
This patchset helps reducing the ignored pep8 errors.
Fixed some ignored hacking rules, as listed follows:
- E111 indentation is not a multiple of four
- E122 continuation line missing indentation or outdented
- E123 closing bracket does not match indentation of opening bracket's line
- E128 continuation line under-indented for visual indent
- E251 unexpected spaces around keyword / parameter equals
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H105 Don't use author tags
- H306 imports not in alphabetical order
Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
Make all test suites in the api, configuration, instance, network,
mysql, router, quota, db, and datastore modules extend
'trove_testtools.TestCase' to enable dangling mock detection.
Co-Authored-By: Peter Stachowski <peter@tesora.com>
Change-Id: If9326709d76972d66fb40b4984bbb5214b0c5189
Partial-Bug: 1448273
The XML api is no longer a requirement, as dictated by the TC.
implements blueprint destroy-xml-api
Change-Id: Ib4669155c19562ae1dda75cd30ad1a8f92b6be6a
Remove vim setting, Remove line containing:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
at the top of source code files, except for files in
openstack/common.
Change-Id: I5e2aad6dca8407890fc3c2afbda541bd4f124ea8
Closes-Bug: #1229324