def test_method_for_uri__lookup(): assert "POST" == method_for_uri("/1.1/users/lookup") assert "POST" == method_for_uri("/1.1/statuses/lookup") assert "POST" == method_for_uri("/1.1/users/lookup/12345") assert "GET" == method_for_uri("/1.1/friendships/lookup")
def test_method_for_uri(): for action in POST_ACTIONS: assert method_for_uri(get_random_str() + '/' + action) == 'POST' assert method_for_uri('statuses/timeline') == 'GET'