def test_three_dev_functionality(self): three.dev("http://api.city.gov") environ = os.environ["OPEN311_CITY_INFO"] expected = '{"endpoint": "http://api.city.gov"}' self.assertEqual(environ, expected)
def test_three_dev_keyword_arguments(self): three.dev("http://api.city.gov", format="xml") environ = os.environ["OPEN311_CITY_INFO"] expected = '{"endpoint": "http://api.city.gov", "format": "xml"}' self.assertEqual(environ, expected)
"""SMSified logic for the MTA application.""" import os import requests as req import three if 'PRODUCTION_ENV' in os.environ: # Then we'll use the actual SeeClickFix endpoint. macon = three.city('macon') else: # Otherwise, it's testing. macon = three.dev('http://seeclicktest.com/open311/v2') class AddressError(Exception): """Can't parse an address from a text message.""" pass class AuthenticationError(Exception): """ Error should be raised when the SMSified username and password aren't known. """ pass def auth(): """ Get SMSified username and password authentication from environment
def test_three_dev_keyword_arguments(self): three.dev('http://api.city.gov', format='xml') environ = json.loads(os.environ['OPEN311_CITY_INFO']) expected = {"endpoint": "http://api.city.gov", "format": "xml"} self.assertEqual(environ, expected)
def test_three_dev_functionality(self): three.dev('http://api.city.gov') environ = os.environ['OPEN311_CITY_INFO'] expected = '{"endpoint": "http://api.city.gov"}' self.assertEqual(environ, expected)
"""SMSified logic for the MTA application.""" import os import requests as req import three if 'PRODUCTION_ENV' in os.environ: # Then we'll use the actual SeeClickFix endpoint. macon = three.city('macon') else: # Otherwise, it's testing. macon = three.dev('http://seeclicktest.com/open311/v2') class AddressError(Exception): """Can't parse an address from a text message.""" pass class AuthenticationError(Exception): """ Error should be raised when the SMSified username and password aren't known. """ pass def auth(): """ Get SMSified username and password authentication from environment variables.