data-driven approach unittest

from Parameterized Import Parameterized 
# check out the data to be returned into the reference sequence corresponding to the following 
@ parameterized.expand (tools.file_to_list ( ' interface test data .txt ' ))
     DEF test_run (Self, desc, URI, Method, Data, Check ): 
        self._testMethodDoc = desc   # want to show your own use cases described in 
        the Data = self.parse_data (the Data) 
        url = urljoin (setting.server_url, uri) 
        the Response = myRequest (url, Method,, the Data)

 

Guess you like

Origin www.cnblogs.com/brainchan/p/11221198.html