2
Test class for mauscelery.mausworker module.
5
# This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
7
# MAUS is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
12
# MAUS is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with MAUS. If not, see <http://www.gnu.org/licenses/>.
22
from mauscelery.state import MausConfiguration
23
from mauscelery.mausworker import get_maus_configuration
25
class GetMausConfigPanelTestCase(unittest.TestCase): # pylint: disable=R0904, C0301
27
Test class for mauscelery.mausworker.get_maus_configuration method.
30
def test_panel_get_config(self):
32
Test the get_maus_configuration panel operation.
33
@param self Object reference.
35
MausConfiguration.transform = "MapPyTestMap"
36
MausConfiguration.configuration = "{test}"
37
config = get_maus_configuration(None)
38
self.assertTrue(config.has_key("config_id"),
39
"Missing config_id key")
40
self.assertEquals(MausConfiguration.config_id,
41
config["config_id"], "Unexpected config_id")
42
self.assertTrue(config.has_key("configuration"),
43
"Missing configuration key")
44
self.assertEquals(MausConfiguration.configuration,
45
config["configuration"], "Unexpected configuration")
46
self.assertTrue(config.has_key("transform"),
48
self.assertEquals(MausConfiguration.transform,
49
config["transform"], "Unexpected transform")
51
if __name__ == '__main__':