@@ -98,7 +98,7 @@ def test_document_service_no_resource(self):
9898 os .remove (self .resource_model_file )
9999 service_documenter = ServiceDocumenter ('myservice' , self .session )
100100 contents = service_documenter .document_service ().decode ('utf-8' )
101- self . assertNotIn ( 'Service Resource' , contents )
101+ assert 'Service Resource' not in contents
102102
103103 def test_document_service_no_paginators (self ):
104104 # Delete the resource model so that the resource is not documented
@@ -107,7 +107,7 @@ def test_document_service_no_paginators(self):
107107 os .remove (self .paginator_model_file )
108108 service_documenter = ServiceDocumenter ('myservice' , self .session )
109109 contents = service_documenter .document_service ().decode ('utf-8' )
110- self . assertNotIn ( 'Paginators' , contents )
110+ assert 'Paginators' not in contents
111111
112112 def test_document_service_no_waiter (self ):
113113 # Delete the resource model so that the resource is not documented
@@ -116,7 +116,7 @@ def test_document_service_no_waiter(self):
116116 os .remove (self .waiter_model_file )
117117 service_documenter = ServiceDocumenter ('myservice' , self .session )
118118 contents = service_documenter .document_service ().decode ('utf-8' )
119- self . assertNotIn ( 'Waiters' , contents )
119+ assert 'Waiters' not in contents
120120
121121 def test_creates_correct_path_to_examples_based_on_service_name (self ):
122122 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):
126126 isfile .return_value = False
127127 s = ServiceDocumenter ('myservice' , self .session )
128128 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 )
132130
133131 def test_injects_examples_when_found (self ):
134132 examples_path = os .sep .join ([os .path .dirname (__file__ ), '..' , 'data' ,
@@ -137,5 +135,5 @@ def test_injects_examples_when_found(self):
137135 'myservice' , self .session )
138136 service_documenter .EXAMPLE_PATH = examples_path
139137 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