forked from square/square-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_locations_api.py
More file actions
29 lines (19 loc) · 906 Bytes
/
test_locations_api.py
File metadata and controls
29 lines (19 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
import json
from tests.api.api_test_base import ApiTestBase
from apimatic_core.utilities.comparison_helper import ComparisonHelper
from square.api_helper import APIHelper
class LocationsApiTests(ApiTestBase):
controller = None
@classmethod
def setUpClass(cls):
super(LocationsApiTests, cls).setUpClass()
cls.controller = cls.client.locations
cls.response_catcher = cls.controller.http_call_back
# Provides details about all of the seller's [locations](https://developer.squareup.com/docs/locations-api),
#including those with an inactive status. Locations are listed alphabetically by `name`.
def test_list_locations(self):
# Perform the API call through the SDK function
result = self.controller.list_locations()
# Test response code
assert self.response_catcher.response.status_code == 200