mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	tests: Remove upload-file from curl test exclude_list.
This commit is contained in:
		@@ -185,7 +185,7 @@ def remove_realm_filters() -> Dict[str, Any]:
 | 
			
		||||
        "filter_id": filter_id
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@openapi_param_value_generator(["/realm/emoji/{emoji_name}:post"])
 | 
			
		||||
@openapi_param_value_generator(["/realm/emoji/{emoji_name}:post", "/user_uploads:post"])
 | 
			
		||||
def upload_custom_emoji() -> Dict[str, Any]:
 | 
			
		||||
    return {
 | 
			
		||||
        "filename": "zerver/tests/images/animated_img.gif",
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,6 @@ import json
 | 
			
		||||
import shlex
 | 
			
		||||
import subprocess
 | 
			
		||||
import markdown
 | 
			
		||||
import os
 | 
			
		||||
import html
 | 
			
		||||
 | 
			
		||||
from zulip import Client
 | 
			
		||||
@@ -11,11 +10,6 @@ from zerver.lib.bugdown import api_code_examples
 | 
			
		||||
from zerver.models import get_realm
 | 
			
		||||
from zerver.openapi.curl_param_value_generators import REGISTERED_GENERATOR_FUNCTIONS, CALLED_GENERATOR_FUNCTIONS
 | 
			
		||||
 | 
			
		||||
exclude_list = [
 | 
			
		||||
    # Example files do not exist
 | 
			
		||||
    'upload-file.md',
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
def test_generated_curl_examples_for_success(client: Client) -> None:
 | 
			
		||||
    authentication_line = "{}:{}".format(client.email, client.api_key)
 | 
			
		||||
    # A limited markdown engine that just processes the code example syntax.
 | 
			
		||||
@@ -24,9 +18,6 @@ def test_generated_curl_examples_for_success(client: Client) -> None:
 | 
			
		||||
        api_url=realm.uri + "/api")])
 | 
			
		||||
 | 
			
		||||
    for file_name in glob.glob("templates/zerver/api/*.md"):
 | 
			
		||||
        if os.path.basename(file_name) in exclude_list:
 | 
			
		||||
            print("Skipping", file_name)
 | 
			
		||||
            continue
 | 
			
		||||
        documentation_lines = open(file_name, "r").readlines()
 | 
			
		||||
        for line in documentation_lines:
 | 
			
		||||
            # A typical example from the markdown source looks like this:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user