blob: 07ff9a67e0d88c5ef2c9874f7a34b4730d81a385 [file] [log] [blame]
Alex3bc95f62020-03-05 17:00:04 -06001import os
2
3from tests.mocks import _res_dir
4from tests.test_base import CfgCheckerTestBase
5
6
7class TestReclassModule(CfgCheckerTestBase):
8 def test_reclass_list(self):
9 _models_dir = os.path.join(_res_dir, "models")
10 _args = ["list", "-p", _models_dir]
11
12 _r_code = self.run_cli(
13 "reclass",
14 _args
15 )
16 self.assertEqual(
17 _r_code,
18 0,
19 "'cmp-reclass {}' command failed".format(" ".join(_args))
20 )
21
22 def test_reclass_compare(self):
23 _models_dir = os.path.join(_res_dir, "models")
24 _model01 = os.path.join(_models_dir, "model01")
25 _model02 = os.path.join(_models_dir, "model02")
26 _report_path = os.path.join(_res_dir, "_fake.html")
27 _args = [
28 "diff",
29 "--model1",
30 _model01,
31 "--model2",
32 _model02,
33 "--html",
34 _report_path
35 ]
36
37 _r_code = self.run_cli(
38 "reclass",
39 _args
40 )
41 self.assertEqual(
42 _r_code,
43 0,
44 "'cmp-reclass {}' command failed".format(" ".join(_args))
45 )