pointless refactoring of stuff that's never used
This commit is contained in:
parent
c7e1902aa2
commit
3b8181062c
|
@ -275,6 +275,7 @@ class AirtimeApiClient(object):
|
||||||
|
|
||||||
|
|
||||||
def get_schedule(self):
|
def get_schedule(self):
|
||||||
|
# TODO : properly refactor this routine
|
||||||
logger = self.logger
|
logger = self.logger
|
||||||
|
|
||||||
# Construct the URL
|
# Construct the URL
|
||||||
|
|
|
@ -21,14 +21,13 @@ import inspect
|
||||||
from configobj import ConfigObj
|
from configobj import ConfigObj
|
||||||
|
|
||||||
# custom imports
|
# custom imports
|
||||||
from util import *
|
#from util import *
|
||||||
from api_clients import *
|
from api_client import AirtimeApiClient
|
||||||
|
|
||||||
import random
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
# configure logging
|
# configure logging
|
||||||
logging.config.fileConfig("logging-api-validator.cfg")
|
#logging.config.fileConfig("logging-api-validator.cfg")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
config = ConfigObj('/etc/airtime/pypo.cfg')
|
config = ConfigObj('/etc/airtime/pypo.cfg')
|
||||||
|
@ -40,7 +39,7 @@ except Exception, e:
|
||||||
class TestApiFunctions(unittest.TestCase):
|
class TestApiFunctions(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.api_client = api_client.api_client_factory(config)
|
self.api_client = AirtimeApiClient()
|
||||||
|
|
||||||
def test_is_server_compatible(self):
|
def test_is_server_compatible(self):
|
||||||
self.assertTrue(self.api_client.is_server_compatible(False))
|
self.assertTrue(self.api_client.is_server_compatible(False))
|
||||||
|
@ -66,6 +65,7 @@ class TestApiFunctions(unittest.TestCase):
|
||||||
|
|
||||||
def test_notify_media_item_start_playing(self):
|
def test_notify_media_item_start_playing(self):
|
||||||
response = self.api_client.notify_media_item_start_playing('{"schedule_id":1}', 5)
|
response = self.api_client.notify_media_item_start_playing('{"schedule_id":1}', 5)
|
||||||
|
return response =
|
||||||
self.assertTrue(response.has_key("status"))
|
self.assertTrue(response.has_key("status"))
|
||||||
self.assertTrue(response.has_key("message"))
|
self.assertTrue(response.has_key("message"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue