13
13
def mock_metadata ():
14
14
return FMEPackageMetadata (
15
15
{
16
- "uid" : "package" ,
16
+ "uid" : "package-hyphen " ,
17
17
"publisher_uid" : "example" ,
18
18
"package_content" : {"transformers" : [{"name" : "Transformer" , "version" : 1 }]},
19
19
}
@@ -22,35 +22,35 @@ def mock_metadata():
22
22
23
23
def test_get_expected_help_contexts_transformer (mock_metadata ):
24
24
assert get_expected_help_index (mock_metadata ) == {
25
- "fmx_example_package_Transformer " : "/Transformer.htm"
25
+ "fmx_example_package-hyphen_Transformer " : "/Transformer.htm"
26
26
}
27
27
28
28
29
29
def test_get_expected_help_contexts_format ():
30
30
metadata = FMEPackageMetadata (
31
31
{
32
- "uid" : "package" ,
32
+ "uid" : "package-hyphen " ,
33
33
"publisher_uid" : "example" ,
34
34
"package_content" : {"formats" : [{"name" : "demoformat" }]},
35
35
}
36
36
)
37
37
assert get_expected_help_index (metadata ) == {
38
- "ft_example_package_demoformat_param_r " : "/demoformat_ft_param_r.htm" ,
39
- "ft_example_package_demoformat_param_w " : "/demoformat_ft_param_w.htm" ,
40
- "ft_example_package_demoformat_user_attr " : "/demoformat_ft_user_attr.htm" ,
41
- "param_example_package_demoformat_r " : "/demoformat_param_r.htm" ,
42
- "param_example_package_demoformat_w " : "/demoformat_param_w.htm" ,
43
- "rw_example_package_demoformat_feature_rep " : "/demoformat_feature_rep.htm" ,
44
- "rw_example_package_demoformat_index " : "/demoformat.htm" ,
38
+ "ft_example_package_hyphen_demoformat_param_r " : "/demoformat_ft_param_r.htm" ,
39
+ "ft_example_package_hyphen_demoformat_param_w " : "/demoformat_ft_param_w.htm" ,
40
+ "ft_example_package_hyphen_demoformat_user_attr " : "/demoformat_ft_user_attr.htm" ,
41
+ "param_example_package_hyphen_demoformat_r " : "/demoformat_param_r.htm" ,
42
+ "param_example_package_hyphen_demoformat_w " : "/demoformat_param_w.htm" ,
43
+ "rw_example_package_hyphen_demoformat_feature_rep " : "/demoformat_feature_rep.htm" ,
44
+ "rw_example_package_hyphen_demoformat_index " : "/demoformat.htm" ,
45
45
}
46
46
assert sorted (get_expected_help_index (metadata )) == [
47
- "ft_example_package_demoformat_param_r " ,
48
- "ft_example_package_demoformat_param_w " ,
49
- "ft_example_package_demoformat_user_attr " ,
50
- "param_example_package_demoformat_r " ,
51
- "param_example_package_demoformat_w " ,
52
- "rw_example_package_demoformat_feature_rep " ,
53
- "rw_example_package_demoformat_index " ,
47
+ "ft_example_package_hyphen_demoformat_param_r " ,
48
+ "ft_example_package_hyphen_demoformat_param_w " ,
49
+ "ft_example_package_hyphen_demoformat_user_attr " ,
50
+ "param_example_package_hyphen_demoformat_r " ,
51
+ "param_example_package_hyphen_demoformat_w " ,
52
+ "rw_example_package_hyphen_demoformat_feature_rep " ,
53
+ "rw_example_package_hyphen_demoformat_index " ,
54
54
]
55
55
56
56
@@ -101,4 +101,4 @@ def test_md(mock_metadata, tmp_path):
101
101
index_file = tmp_path / "package_help.csv"
102
102
assert index_file .is_file ()
103
103
with index_file .open ("r" ) as f :
104
- assert f .read () == "fmx_example_package_Transformer ,/Transformer.htm\n "
104
+ assert f .read () == "fmx_example_package-hyphen_Transformer ,/Transformer.htm\n "
0 commit comments