Exemplo n.º 1
0
def test_download_link_fetching(mocker, regions_list, services_list):
    with open('./test_data/response_mock.txt') as f:
        response = f.read()
        client = Client(regions_list, services_list)

        mocker.patch('CommonServerPython.BaseClient._http_request',
                     return_value=response)
        assert client.get_azure_download_link() == 'https://download.microsoft.com/download' \
                                                   '/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/' \
                                                   'ServiceTags_Public_20200504.json'
Exemplo n.º 2
0
def test_download_link_fetching(regions_list, services_list):
    client = Client(regions_list, services_list)
    assert client.get_azure_download_link()