@@ -68,88 +68,98 @@ def test_params_decorator_delete():
68
68
69
69
70
70
def test_decorator_bold_list_get ():
71
- ''' Tests that the get route is wrapped in bold'''
71
+ """ Tests that the get route is wrapped in bold"""
72
72
resp = client .get ('/decorated_bold_list_view/1234' )
73
73
eq_ (b'<b>' in resp .data , True )
74
74
eq_ (b'</b>' in resp .data , True )
75
+ eq_ (b'<b>Get 1234</b>' , resp .data )
75
76
76
77
77
78
def test_decorator_bold_list_index ():
78
- ''' Tests that the index route is wrapped in bold'''
79
+ """ Tests that the index route is wrapped in bold"""
79
80
resp = client .get ('/decorated_bold_list_view/' )
80
81
eq_ (b'<b>' in resp .data , True )
81
82
eq_ (b'</b>' in resp .data , True )
83
+ eq_ (b'<b>Index</b>' , resp .data )
82
84
83
85
84
86
def test_decorator_bold_italics_list_get ():
85
- ''' Tests that the get route is wrapped in bold and italics'''
87
+ """ Tests that the get route is wrapped in bold and italics"""
86
88
resp = client .get ('/decorated_bold_italics_list_view/1234' )
87
89
eq_ (b'<i>' in resp .data , True )
88
90
eq_ (b'</i>' in resp .data , True )
89
91
eq_ (b'<b>' in resp .data , True )
90
92
eq_ (b'</b>' in resp .data , True )
93
+ eq_ (b'<b><i>Get 1234</i></b>' , resp .data )
91
94
92
95
93
96
def test_decorator_bold_italics_list_index ():
94
- ''' Tests that the index route is wrapped in bold and italics'''
97
+ """ Tests that the index route is wrapped in bold and italics"""
95
98
resp = client .get ('/decorated_bold_italics_list_view/' )
96
99
eq_ (b'<i>' in resp .data , True )
97
100
eq_ (b'</i>' in resp .data , True )
98
101
eq_ (b'<b>' in resp .data , True )
99
102
eq_ (b'</b>' in resp .data , True )
103
+ eq_ (b'<b><i>Index</i></b>' , resp .data )
100
104
101
105
102
106
def test_decorator_list_member_index ():
103
- '''
107
+ """
104
108
Tests that the index route is wrapped in bold,
105
109
italics and paragraph
106
- '''
110
+ """
107
111
resp = client .get ('/decorated_list_member_view/' )
108
112
eq_ (b'<i>' in resp .data , True )
109
113
eq_ (b'</i>' in resp .data , True )
110
114
eq_ (b'<b>' in resp .data , True )
111
115
eq_ (b'</b>' in resp .data , True )
112
116
eq_ (b'<p>' not in resp .data , True )
113
117
eq_ (b'</p>' not in resp .data , True )
118
+ eq_ (b'<b><i>Index</i></b>' , resp .data )
114
119
115
120
116
121
def test_decorator_list_member_get ():
117
- ''' Tests the ordering of decorators'''
122
+ """ Tests the ordering of decorators"""
118
123
resp = client .get ('/decorated_list_member_view/1234' )
119
124
eq_ (b'<b>' , resp .data [:3 ])
120
125
eq_ (b'<i>' , resp .data [3 :6 ])
121
126
eq_ (b'<p>' , resp .data [6 :9 ])
122
127
eq_ (b'</p>' , resp .data [- 12 :- 8 ])
123
128
eq_ (b'</i>' , resp .data [- 8 :- 4 ])
124
129
eq_ (b'</b>' , resp .data [- 4 :])
130
+ eq_ (b'<b><i><p>Get 1234</p></i></b>' , resp .data )
125
131
126
132
127
133
def test_decorator_list_function_attributes_get ():
128
- ''' Verify list of decorators with attributes modify all functions in FlaskView'''
134
+ """ Verify list of decorators with attributes modify all functions in FlaskView"""
129
135
resp = client .get ('/decorated_list_function_attributes_view/1234' )
130
136
eq_ (b'Get 1234' in resp .data , True )
137
+ eq_ (b'<i><b>Get 1234</b></i>' , resp .data )
131
138
eq_ (hasattr (app .view_functions ['DecoratedListFunctionAttributesView:get' ], 'eggs' ), True )
132
139
eq_ ('scrambled' , app .view_functions ['DecoratedListFunctionAttributesView:get' ].eggs )
133
140
134
141
135
142
def test_decorator_list_function_attributes_index ():
136
- ''' Verify list of decorators with attributes modify all functions in FlaskView'''
143
+ """ Verify list of decorators with attributes modify all functions in FlaskView"""
137
144
resp = client .get ('/decorated_list_function_attributes_view/' )
138
145
eq_ (b'Index' in resp .data , True )
146
+ eq_ (b'<i>Index</i>' , resp .data )
139
147
eq_ (hasattr (app .view_functions ['DecoratedListFunctionAttributesView:index' ], 'eggs' ), True )
140
148
eq_ ('scrambled' , app .view_functions ['DecoratedListFunctionAttributesView:index' ].eggs )
141
149
142
150
143
151
def test_decorator_list_member_function_attributes_get ():
144
- ''' Verify decorator with attributes does not modify other members'''
152
+ """ Verify decorator with attributes does not modify other members"""
145
153
resp = client .get ('/decorated_list_member_function_attributes_view/4321' )
146
154
eq_ (b'Get 4321' in resp .data , True )
155
+ eq_ (b'<i><b>Get 4321</b></i>' , resp .data )
147
156
eq_ (hasattr (app .view_functions ['DecoratedListMemberFunctionAttributesView:get' ], 'eggs' ), False )
148
157
149
158
150
159
def test_decorator_list_member_function_attributes_index ():
151
- ''' Verify decorator with attributes modify decorated memeber functions'''
160
+ """ Verify decorator with attributes modify decorated memeber functions"""
152
161
resp = client .get ('/decorated_list_member_function_attributes_view/' )
153
162
eq_ (b'Index' in resp .data , True )
163
+ eq_ (b'<i>Index</i>' , resp .data )
154
164
eq_ (hasattr (app .view_functions ['DecoratedListMemberFunctionAttributesView:index' ], 'eggs' ), True )
155
165
eq_ ('scrambled' , app .view_functions ['DecoratedListMemberFunctionAttributesView:index' ].eggs )
0 commit comments