def test_basic_client(): client = correios.Correios(username="******", password="******", environment=correios.Correios.TEST) assert client.sigep_url == str( get_resource_path('wsdls/AtendeCliente-test.wsdl')) assert not client.sigep_verify assert client.username == "sigep" assert client.password == "XXXXXX"
class Freight(WebService): base_uri = str(get_resource_path('wsdls') / 'CalcPrecoPrazo.xml')
def test_should_use_pkg_resources_to_get_wsdl_files(mock_resource): path = get_resource_path('fake') mock_resource.assert_called_with('correios', 'data/fake') assert str(path) == "/"
def test_get_wsdl_file_path(): path = get_resource_path('fake') assert str(path).endswith('correios/data/fake')