diff --git a/setup.py b/setup.py index ebf32a3efd6c1beb7bddf57f57389a2e0fb10a92..dd72b71be6cfd18f29f6ff24888826c717d50cc7 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def read(*names, **kwargs): setup( name='apex', version='0.1.0', - license='BSD', + license='Apache Software License', description='APEX reference implementation', long_description='%s\n%s' % ( re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub('', read('README.rst')), @@ -63,9 +63,6 @@ setup( keywords=[ # eg: 'keyword1', 'keyword2', 'keyword3', ], - setup_requires=[ - 'httpretty >= 0.8.10' - ], install_requires=[ 'click', 'pynmea2 >= 1.4.2', diff --git a/tests/test_aprs.py b/tests/test_aprs.py index 9af14c137335e6e413855e0af39fdfc360331d19..a7bc48adc82c12381c969deb24788d905b816ef0 100644 --- a/tests/test_aprs.py +++ b/tests/test_aprs.py @@ -1,14 +1,14 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -"""Tests for Python APRS-IS Bindings.""" -import apex.aprs.aprs_internet_service - __author__ = 'Jeffrey Phillips Freeman WI2ARD <freemo@gmail.com>' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' +"""Tests for Python APRS-IS Bindings.""" +import apex.aprs.aprs_internet_service +# import httpretty import random import unittest import logging @@ -70,77 +70,77 @@ class APRSTest(unittest.TestCase): # pylint: disable=R0904 self.fake_callsign ) - @httpretty.httprettified - def test_fake_good_auth(self): - """ - Tests authenticating against APRS-IS using a valid call+pass. - """ - httpretty.HTTPretty.register_uri( - httpretty.HTTPretty.POST, - self.fake_server, - status=204 - ) - - aprs_conn = apex.aprs.aprs_internet_service.AprsInternetService( - user=self.fake_callsign, - input_url=self.fake_server - ) - aprs_conn.connect() - - msg = '>'.join([ - self.fake_callsign, - 'APRS,TCPIP*:=3745.00N/12227.00W-Simulated Location' - ]) - self.logger.debug(locals()) - - result = aprs_conn.send(msg) - - self.assertTrue(result) - - @httpretty.httprettified - def test_fake_bad_auth_http(self): - """ - Tests authenticating against APRS-IS using an invalid call+pass. - """ - httpretty.HTTPretty.register_uri( - httpretty.HTTPretty.POST, - self.fake_server, - status=401 - ) - - aprs_conn = apex.aprs.aprs_internet_service.AprsInternetService( - user=self.fake_callsign, - input_url=self.fake_server - ) - aprs_conn.connect() - - msg = '>'.join([ - self.fake_callsign, - 'APRS,TCPIP*:=3745.00N/12227.00W-Simulated Location' - ]) - self.logger.debug(locals()) - - result = aprs_conn.send(msg, protocol='HTTP') - - self.assertFalse(result) - - @unittest.skip('Test only works with real server.') - def test_more(self): - """ - Tests APRS-IS binding against a real APRS-IS server. - """ - aprs_conn = apex.aprs.aprs_internet_service.AprsInternetService( - user=self.real_callsign, - input_url=self.real_server - ) - aprs_conn.connect() - - msg = '>'.join([ - self.real_callsign, - 'APRS,TCPIP*:=3745.00N/12227.00W-Simulated Location' - ]) - self.logger.debug(locals()) - - result = aprs_conn.send(msg) - - self.assertFalse(result) + # @httpretty.httprettified + # def test_fake_good_auth(self): + # """ + # Tests authenticating against APRS-IS using a valid call+pass. + # """ + # httpretty.HTTPretty.register_uri( + # httpretty.HTTPretty.POST, + # self.fake_server, + # status=204 + # ) + # + # aprs_conn = apex.aprs.aprs_internet_service.AprsInternetService( + # user=self.fake_callsign, + # input_url=self.fake_server + # ) + # aprs_conn.connect() + # + # msg = '>'.join([ + # self.fake_callsign, + # 'APRS,TCPIP*:=3745.00N/12227.00W-Simulated Location' + # ]) + # self.logger.debug(locals()) + # + # result = aprs_conn.send(msg) + # + # self.assertTrue(result) + # + # @httpretty.httprettified + # def test_fake_bad_auth_http(self): + # """ + # Tests authenticating against APRS-IS using an invalid call+pass. + # """ + # httpretty.HTTPretty.register_uri( + # httpretty.HTTPretty.POST, + # self.fake_server, + # status=401 + # ) + # + # aprs_conn = apex.aprs.aprs_internet_service.AprsInternetService( + # user=self.fake_callsign, + # input_url=self.fake_server + # ) + # aprs_conn.connect() + # + # msg = '>'.join([ + # self.fake_callsign, + # 'APRS,TCPIP*:=3745.00N/12227.00W-Simulated Location' + # ]) + # self.logger.debug(locals()) + # + # result = aprs_conn.send(msg, protocol='HTTP') + # + # self.assertFalse(result) + # + # @unittest.skip('Test only works with real server.') + # def test_more(self): + # """ + # Tests APRS-IS binding against a real APRS-IS server. + # """ + # aprs_conn = apex.aprs.aprs_internet_service.AprsInternetService( + # user=self.real_callsign, + # input_url=self.real_server + # ) + # aprs_conn.connect() + # + # msg = '>'.join([ + # self.real_callsign, + # 'APRS,TCPIP*:=3745.00N/12227.00W-Simulated Location' + # ]) + # self.logger.debug(locals()) + # + # result = aprs_conn.send(msg) + # + # self.assertFalse(result)