def testConnectionFail(self): self.isolate_mock.side_effect = Exception result = upload_symbols.OpenDeduplicateConnection('namespace') self.assertEqual(result, None)
def testConnection(self): result = upload_symbols.OpenDeduplicateConnection('namespace') self.assertTrue(result is not None) self.assertEqual( self.isolate_mock.mock_calls, [mock.call('https://isolateserver.appspot.com', 'namespace')])