@@ -98,7 +98,7 @@ def test_document_service_no_resource(self):
98
98
os .remove (self .resource_model_file )
99
99
service_documenter = ServiceDocumenter ('myservice' , self .session )
100
100
contents = service_documenter .document_service ().decode ('utf-8' )
101
- self . assertNotIn ( 'Service Resource' , contents )
101
+ assert 'Service Resource' not in contents
102
102
103
103
def test_document_service_no_paginators (self ):
104
104
# Delete the resource model so that the resource is not documented
@@ -107,7 +107,7 @@ def test_document_service_no_paginators(self):
107
107
os .remove (self .paginator_model_file )
108
108
service_documenter = ServiceDocumenter ('myservice' , self .session )
109
109
contents = service_documenter .document_service ().decode ('utf-8' )
110
- self . assertNotIn ( 'Paginators' , contents )
110
+ assert 'Paginators' not in contents
111
111
112
112
def test_document_service_no_waiter (self ):
113
113
# Delete the resource model so that the resource is not documented
@@ -116,7 +116,7 @@ def test_document_service_no_waiter(self):
116
116
os .remove (self .waiter_model_file )
117
117
service_documenter = ServiceDocumenter ('myservice' , self .session )
118
118
contents = service_documenter .document_service ().decode ('utf-8' )
119
- self . assertNotIn ( 'Waiters' , contents )
119
+ assert 'Waiters' not in contents
120
120
121
121
def test_creates_correct_path_to_examples_based_on_service_name (self ):
122
122
path = os .sep .join ([os .path .dirname (boto3 .__file__ ),
@@ -126,9 +126,7 @@ def test_creates_correct_path_to_examples_based_on_service_name(self):
126
126
isfile .return_value = False
127
127
s = ServiceDocumenter ('myservice' , self .session )
128
128
s .document_service ()
129
- self .assertEqual (
130
- isfile .call_args_list [- 1 ],
131
- mock .call (path ))
129
+ assert isfile .call_args_list [- 1 ] == mock .call (path )
132
130
133
131
def test_injects_examples_when_found (self ):
134
132
examples_path = os .sep .join ([os .path .dirname (__file__ ), '..' , 'data' ,
@@ -137,5 +135,5 @@ def test_injects_examples_when_found(self):
137
135
'myservice' , self .session )
138
136
service_documenter .EXAMPLE_PATH = examples_path
139
137
contents = service_documenter .document_service ().decode ('utf-8' )
140
- self . assertIn ( 'This is an example' , contents )
141
- self . assertNotIn ( 'This is for another service' , contents )
138
+ assert 'This is an example' in contents
139
+ assert 'This is for another service' not in contents
0 commit comments