def test_api_url_without_php_ending_with_trailing_slash(): with wrap() as wrapper: with open(".dexyapis", "wb") as f: json.dump({ "wordpress" : {"url" : "http://example.com/api/"} }, f) url = WordPressFilter.api_url() assert url == "http://example.com/api/xmlrpc.php"