-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mgr/dashboard: clean-up python unit tests (ceph#28696)
mgr/dashboard: clean-up python unit tests Reviewed-by: Alfonso Martínez <[email protected]> Reviewed-by: Kefu Chai <[email protected]> Reviewed-by: Stephan Müller <[email protected]>
- Loading branch information
Showing
51 changed files
with
354 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import sys | ||
|
||
try: | ||
from mock import Mock | ||
except ImportError: | ||
from unittest.mock import Mock | ||
|
||
|
||
class MockRadosError(Exception): | ||
def __init__(self, message, errno=None): | ||
super(MockRadosError, self).__init__(message) | ||
self.errno = errno | ||
|
||
def __str__(self): | ||
msg = super(MockRadosError, self).__str__() | ||
if self.errno is None: | ||
return msg | ||
return '[errno {0}] {1}'.format(self.errno, msg) | ||
|
||
|
||
def pytest_configure(config): | ||
sys.modules.update({ | ||
'rados': Mock(Error=MockRadosError, OSError=MockRadosError), | ||
'rbd': Mock(), | ||
'cephfs': Mock(), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CherryPy==13.1.0 | ||
enum34==1.1.6 | ||
more-itertools==4.1.0 | ||
PyJWT==1.6.4 | ||
pyopenssl==17.5.0 | ||
bcrypt==3.1.4 | ||
python3-saml==1.4.1 | ||
requests==2.20.0 | ||
Routes==2.4.1 | ||
six==1.11.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.