From 6472918323aa153cddb860d50b4a4368743a4c22 Mon Sep 17 00:00:00 2001 From: Edward Wells Date: Tue, 18 Apr 2017 19:16:54 -0400 Subject: [PATCH] Fixed unit test bug --- martapy/rail.py | 2 +- tests/test_arrivals.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/martapy/rail.py b/martapy/rail.py index 12f1a9b..effd997 100644 --- a/martapy/rail.py +++ b/martapy/rail.py @@ -99,7 +99,7 @@ def arrivals(self): @property def url(self): """``RailClient.base_url`` formatted with API key""" - return self.base_url.format(self.api_key) + return self.base_url.format(api_key=self.api_key) class Arrivals(list): diff --git a/tests/test_arrivals.py b/tests/test_arrivals.py index 0dea369..3cbb21e 100644 --- a/tests/test_arrivals.py +++ b/tests/test_arrivals.py @@ -10,7 +10,7 @@ def setUp(self): conf_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.ini') test_config.read(conf_file) - api_key = test_config.get('rail', 'api_key') + api_key = test_config.get('rail', 'apikey') self.api_client = RailClient(api_key=api_key) self.r = self.api_client.arrivals()