# Path: bingmaps/apiservices/locations.py
# class LocationByAddress(LocationApi):
#     """Location by address API class
# 
#     This class is used to retrieve the output from the given data from the
#     user.
#       - First, the data is used to build a URL which is related to the
#         Locations by Address API.
#       - Second, this class helps in retrieving the response from the URL built
#       - Third, based on the response, this class helps in retrieving all the
#         corresponding output data from the response. Some of the output data
#         which this class would be retrieving is:
#           - Coordinates (latitude/longitude)
#           - BoundingBox coordinates (south latitude, west longitude,
#             north latitude, east longitude)
#           - Address
# 
#     The output from the URL can be either JSON/XML based on the output
#     parameter mentioned in the data. Even the output response is 'xml', this
#     class helps in converting the xml response to JSON data first and then
#     retrieve all the necessary output from it.
# 
#     :ivar data: The data that the user will send in to the Location by address
#         to retrieve all the respective output from the response
#     :ivar url: The url that gets built based on the user's given data
#     :ivar http_protocol: Http protocol for the URL. Can be either of the
#         following:
#           - http
#           - https
#     :ivar schema: The schema that gets used to build the URL and the schema
#         is LocationByAddressUrl for location by address API service.
#     :ivar file_name: The filename that the class can write the JSON response
#         to.
#           - file_name - 'locationByAddress'
#     :ivar locationApiData: Response from the URL
# 
#     Some of the examples are illustrated in Examples page
#     """
#     def __init__(self, data, http_protocol='http'):
#         if not bool(data):
#             raise TypeError('No data given')
#         schema = LocationByAddressUrl(data, httpprotocol=http_protocol)
#         filename = 'locationByAddress'
#         super().__init__(schema, filename, http_protocol)
#         self.get_data()
# 
#     def get_data(self):
#         """Gets data from the built url"""
#         url = self.build_url()
#         self.locationApiData = requests.get(url)
#         if not self.locationApiData.status_code == 200:
#             raise self.locationApiData.raise_for_status()
# 
#     def build_url(self):
#         """Build the url and replaces /None/ with empty string"""
#         url = super().build_url()
#         if '/None/' in url:
#             return url.replace('/None/', '')
#         else:
#             return url
# 
# Path: tests/fixtures.py
# BING_MAPS_KEY = 'Av6_H8GIYQyP-DLQwLOKDknW64Qfm' \
#                 'VgJmVpfiSO861v0x_j1pLPCOW6s-70nCzEW'
# def create_tmp_dir(tmpdir):


from bingmaps.apiservices import LocationByAddress
from collections import namedtuple
from .fixtures import parametrize, https_protocol, BING_MAPS_KEY
import os
import json
    assert len(addresses) >= 1


@parametrize('data', [
    (DATA[3]),
    (DATA[4]),
    (DATA[6]),
    (DATA[7]),
    (DATA[8]),
    (DATA[9]),
    (DATA[10]),
    (DATA[11])
])
def test_get_bbox(data):
    url = LocationByAddress(data)
    bbox_list = url.get_bbox
    assert len(bbox_list) >= 1


@parametrize('data', [
    (DATA[3]),
    (DATA[4]),
    (DATA[6]),
    (DATA[7]),
    (DATA[8]),
    (DATA[9]),
    (DATA[10]),
    (DATA[11])
])
def test_location_by_address_response(data):

# Path: bingmaps/apiservices/locations.py
# class LocationByAddress(LocationApi):
#     """Location by address API class
# 
#     This class is used to retrieve the output from the given data from the
#     user.
#       - First, the data is used to build a URL which is related to the
#         Locations by Address API.
#       - Second, this class helps in retrieving the response from the URL built
#       - Third, based on the response, this class helps in retrieving all the
#         corresponding output data from the response. Some of the output data
#         which this class would be retrieving is:
#           - Coordinates (latitude/longitude)
#           - BoundingBox coordinates (south latitude, west longitude,
#             north latitude, east longitude)
#           - Address
# 
#     The output from the URL can be either JSON/XML based on the output
#     parameter mentioned in the data. Even the output response is 'xml', this
#     class helps in converting the xml response to JSON data first and then
#     retrieve all the necessary output from it.
# 
#     :ivar data: The data that the user will send in to the Location by address
#         to retrieve all the respective output from the response
#     :ivar url: The url that gets built based on the user's given data
#     :ivar http_protocol: Http protocol for the URL. Can be either of the
#         following:
#           - http
#           - https
#     :ivar schema: The schema that gets used to build the URL and the schema
#         is LocationByAddressUrl for location by address API service.
#     :ivar file_name: The filename that the class can write the JSON response
#         to.
#           - file_name - 'locationByAddress'
#     :ivar locationApiData: Response from the URL
# 
#     Some of the examples are illustrated in Examples page
#     """
#     def __init__(self, data, http_protocol='http'):
#         if not bool(data):
#             raise TypeError('No data given')
#         schema = LocationByAddressUrl(data, httpprotocol=http_protocol)
#         filename = 'locationByAddress'
#         super().__init__(schema, filename, http_protocol)
#         self.get_data()
# 
#     def get_data(self):
#         """Gets data from the built url"""
#         url = self.build_url()
#         self.locationApiData = requests.get(url)
#         if not self.locationApiData.status_code == 200:
#             raise self.locationApiData.raise_for_status()
# 
#     def build_url(self):
#         """Build the url and replaces /None/ with empty string"""
#         url = super().build_url()
#         if '/None/' in url:
#             return url.replace('/None/', '')
#         else:
#             return url
# 
# Path: tests/fixtures.py
# BING_MAPS_KEY = 'Av6_H8GIYQyP-DLQwLOKDknW64Qfm' \
#                 'VgJmVpfiSO861v0x_j1pLPCOW6s-70nCzEW'
# def create_tmp_dir(tmpdir):


# Path: tests/test_location_by_address_get_data.py
from bingmaps.apiservices import LocationByAddress
from collections import namedtuple
from .fixtures import parametrize, https_protocol, BING_MAPS_KEY
import os
import json

    assert len(addresses) >= 1


@parametrize('data', [
    (DATA[3]),
    (DATA[4]),
    (DATA[6]),
    (DATA[7]),
    (DATA[8]),
    (DATA[9]),
    (DATA[10]),
    (DATA[11])
])
def test_get_bbox(data):
    url = LocationByAddress(data)
    bbox_list = url.get_bbox
    assert len(bbox_list) >= 1


@parametrize('data', [
    (DATA[3]),
    (DATA[4]),
    (DATA[6]),
    (DATA[7]),
    (DATA[8]),
    (DATA[9]),
    (DATA[10]),
    (DATA[11])
])
def test_location_by_address_response(data):

    url = LocationByAddress(data)