Marc Koderer | 173fc06 | 2015-08-27 14:01:42 +0200 | [diff] [blame] | 1 | # Copyright (c) 2015 Deutsche Telekom AG |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | from tempest.test_discover import plugins |
| 17 | |
| 18 | |
| 19 | class FakePlugin(plugins.TempestPlugin): |
| 20 | expected_load_test = ["my/test/path", "/home/dir"] |
| 21 | |
| 22 | def load_tests(self): |
| 23 | return self.expected_load_test |
| 24 | |
| 25 | def register_opts(self, conf): |
| 26 | return |
| 27 | |
| 28 | def get_opt_lists(self): |
| 29 | return [] |
| 30 | |
| 31 | |
| 32 | class FakeStevedoreObj(object): |
| 33 | obj = FakePlugin() |
| 34 | |
| 35 | @property |
| 36 | def name(self): |
| 37 | return self._name |
| 38 | |
| 39 | def __init__(self, name='Test1'): |
| 40 | self._name = name |