@@ -16,43 +16,42 @@ class TestGeneratorsAsciiFields(unittest.TestCase):
1616 def setUp (self ):
1717 self .foo_fieldset = self .dummy_fieldset ()
1818
19-
2019 def dummy_fieldset (self ):
2120 return {
22- 'description' : 'foo' ,
23- 'fields' : {
24- 'foo.type' : {
25- 'dashed_name' : 'foo-type' ,
26- 'description' : 'describes the foo' ,
27- 'example' : '2016-05-23T08:05:34.853Z' ,
28- 'flat_name' : 'foo.type' ,
29- 'level' : 'core' ,
30- 'name' : 'type' ,
31- 'normalize' : ['array' ],
32- 'short' : 'describes the foo' ,
33- 'ignore_above' : 1024 ,
34- 'type' : 'keyword' ,
35- 'allowed_values' : [{
36- 'description' : 'fluffy foo' ,
37- 'name' : 'fluffy' ,
38- },
39- {
40- 'description' : 'coarse foo' ,
41- 'name' : 'coarse' ,
42- }
43- ]
44- },
45- 'foo.id' : {
46- 'dashed_name' : 'foo-id' ,
47- 'description' : 'Unique ID of the foo.' ,
48- 'example' : 'foo123' ,
49- 'flat_name' : 'foo.id' ,
50- 'ignore_above' : 1024 ,
51- 'level' : 'core' ,
52- 'name' : 'id' ,
53- 'normalize' : [],
54- 'short' : 'Unique ID of the foo.' ,
55- 'type' : 'keyword'
21+ 'description' : 'foo' ,
22+ 'fields' : {
23+ 'foo.type' : {
24+ 'dashed_name' : 'foo-type' ,
25+ 'description' : 'describes the foo' ,
26+ 'example' : '2016-05-23T08:05:34.853Z' ,
27+ 'flat_name' : 'foo.type' ,
28+ 'level' : 'core' ,
29+ 'name' : 'type' ,
30+ 'normalize' : ['array' ],
31+ 'short' : 'describes the foo' ,
32+ 'ignore_above' : 1024 ,
33+ 'type' : 'keyword' ,
34+ 'allowed_values' : [{
35+ 'description' : 'fluffy foo' ,
36+ 'name' : 'fluffy' ,
37+ },
38+ {
39+ 'description' : 'coarse foo' ,
40+ 'name' : 'coarse' ,
41+ }
42+ ]
43+ },
44+ 'foo.id' : {
45+ 'dashed_name' : 'foo-id' ,
46+ 'description' : 'Unique ID of the foo.' ,
47+ 'example' : 'foo123' ,
48+ 'flat_name' : 'foo.id' ,
49+ 'ignore_above' : 1024 ,
50+ 'level' : 'core' ,
51+ 'name' : 'id' ,
52+ 'normalize' : [],
53+ 'short' : 'Unique ID of the foo.' ,
54+ 'type' : 'keyword'
5655 }
5756 },
5857 'reusable' : {
@@ -87,15 +86,14 @@ def dummy_fieldset(self):
8786 'short' : 'Fields describing an AS'
8887 }
8988 ],
90- 'group' : 2 ,
91- 'name' : 'foo' ,
92- 'prefix' : 'foo.' ,
93- 'short' : 'Foo fields' ,
94- 'title' : 'Foo' ,
95- 'type' : 'group'
89+ 'group' : 2 ,
90+ 'name' : 'foo' ,
91+ 'prefix' : 'foo.' ,
92+ 'short' : 'Foo fields' ,
93+ 'title' : 'Foo' ,
94+ 'type' : 'group'
9695 }
9796
98-
9997 def test_validate_sort_fieldset (self ):
10098 sorted_foo_fields = asciidoc_fields .sort_fields (self .foo_fieldset )
10199 #import pdb;pdb.set_trace()
@@ -111,7 +109,6 @@ def test_validate_sort_fieldset(self):
111109 self .assertIn ('fluffy' , sorted_foo_fields [1 ]['allowed_value_names' ])
112110 self .assertIn ('coarse' , sorted_foo_fields [1 ]['allowed_value_names' ])
113111
114-
115112 def test_rendering_fieldset_reuse (self ):
116113 foo_reuse_fields = asciidoc_fields .render_fieldset_reuse_text (self .foo_fieldset )
117114 expected_sorted_reuse_fields = (
@@ -123,7 +120,6 @@ def test_rendering_fieldset_reuse(self):
123120
124121 self .assertEqual (expected_sorted_reuse_fields , tuple (foo_reuse_fields ))
125122
126-
127123 def test_rendering_fieldset_nesting (self ):
128124 foo_nesting_fields = asciidoc_fields .render_nestings_reuse_section (self .foo_fieldset )
129125 self .assertIsInstance (foo_nesting_fields , list )
0 commit comments