def NoInterfaceNICReader(self): nicreader = NicReader(None, None) nicreader.request = {'identifier1':'Nonsense bla bla'} nicreader.measure() assert nicreader.request['error'] == 500 assert nicreader.request['errortext'] == 'could not find interface with IP, aborting measurement'
def loInterfaceNICReader(self): nicreader = NicReader(None, None) nicreader.request = {'identifier1':'127.0.0.1'} nicreader.measure() assert nicreader.request['error'] == 0 assert nicreader.request['errortext'] == 'Measurement successful'