Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 924 for File (0.26 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001_an.py

        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_large_file(tmp_path):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  2. maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java

                            updateCheckManager.touch(metadata, repository, file);
                        }
                    }
    
                    // TODO should this be inside the above check?
                    // touch file so that this is not checked again until interval has passed
                    if (file.exists()) {
                        file.setLastModified(System.currentTimeMillis());
                    }
                }
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

                    },
                ]
            }
        )
    
    
    @needs_py39
    def test_post_file_no_token(tmp_path, app: FastAPI):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  4. maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java

            File localRepo = getLocalRepositoryPath();
    
            System.out.println("Local repository is at: " + localRepo.getAbsolutePath());
    
            File pom0 = new File(localRepo, "p0/pom.xml");
            File pom1 = new File(pom0.getParentFile(), "p1/pom.xml");
            File pom2 = new File(pom1.getParentFile(), "p2/pom.xml");
            File pom3 = new File(pom2.getParentFile(), "p3/pom.xml");
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. maven-compat/src/test/java/org/apache/maven/project/inheritance/t11/ProjectInheritanceTest.java

        @Test
        void testDependencyManagementDoesNotOverrideScopeOfCurrentArtifact() throws Exception {
            File localRepo = getLocalRepositoryPath();
    
            File pom0 = new File(localRepo, "p0/pom.xml");
            File pom0Basedir = pom0.getParentFile();
            File pom1 = new File(pom0Basedir, "p1/pom.xml");
    
            // load the child project, which inherits from p0...
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java

    /*
     * Licensed to the Apache Software Foundation (ASF) under one
     * or more contributor license agreements.  See the NOTICE file
     * distributed with this work for additional information
     * regarding copyright ownership.  The ASF licenses this file
     * to you under the Apache License, Version 2.0 (the
     * "License"); you may not use this file except in compliance
     * with the License.  You may obtain a copy of the License at
     *
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  7. maven-compat/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java

    /*
     * Licensed to the Apache Software Foundation (ASF) under one
     * or more contributor license agreements.  See the NOTICE file
     * distributed with this work for additional information
     * regarding copyright ownership.  The ASF licenses this file
     * to you under the Apache License, Version 2.0 (the
     * "License"); you may not use this file except in compliance
     * with the License.  You may obtain a copy of the License at
     *
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  8. utils/utils.go

    	"runtime"
    	"strconv"
    	"strings"
    	"unicode"
    )
    
    var gormSourceDir string
    
    func init() {
    	_, file, _, _ := runtime.Caller(0)
    	// compatible solution to get gorm source directory with various operating systems
    	gormSourceDir = sourceDir(file)
    }
    
    func sourceDir(file string) string {
    	dir := filepath.Dir(file)
    	dir = filepath.Dir(dir)
    
    	s := filepath.Dir(dir)
    	if filepath.Base(s) != "gorm.io" {
    		s = dir
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

      }
    
      private static File fullpath(String path) {
        return new File(new File(path).toURI());
      }
    
      private static URL makeJarUrlWithName(String name) throws IOException {
        /*
         * TODO: cpovirk - Use java.nio.file.Files.createTempDirectory instead of
         * c.g.c.io.Files.createTempDir?
         */
        File fullPath = new File(Files.createTempDir(), name);
        File jarFile = pickAnyJarFile();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 26 14:02:27 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  10. maven-compat/src/test/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManagerTest.java

            File file = new File(localRepository.getBasedir(), localRepository.pathOf(a));
            file.delete();
            a.setFile(file);
    
            File touchFile = updateCheckManager.getTouchfile(a);
            touchFile.delete();
    
            assertTrue(updateCheckManager.isUpdateRequired(a, remoteRepository));
    
            file.getParentFile().mkdirs();
            file.createNewFile();
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 8.7K bytes
    - Viewed (0)
Back to top