Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Zambia (0.28 sec)

  1. tests/test_datetime_custom_encoder.py

    @needs_pydanticv1
    def test_pydanticv1():
        class ModelWithDatetimeField(BaseModel):
            dt_field: datetime
    
            class Config:
                json_encoders = {
                    datetime: lambda dt: dt.replace(
                        microsecond=0, tzinfo=timezone.utc
                    ).isoformat()
                }
    
        app = FastAPI()
        model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8))
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. tests/test_jsonable_encoder.py

    @needs_pydanticv1
    def test_encode_custom_json_encoders_model_pydanticv1():
        class ModelWithCustomEncoder(BaseModel):
            dt_field: datetime
    
            class Config:
                json_encoders = {
                    datetime: lambda dt: dt.replace(
                        microsecond=0, tzinfo=timezone.utc
                    ).isoformat()
                }
    
        class ModelWithCustomEncoderSubclass(ModelWithCustomEncoder):
            class Config:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. fastapi/encoders.py

    
    ENCODERS_BY_TYPE: Dict[Type[Any], Callable[[Any], Any]] = {
        bytes: lambda o: o.decode(),
        Color: str,
        datetime.date: isoformat,
        datetime.datetime: isoformat,
        datetime.time: isoformat,
        datetime.timedelta: lambda td: td.total_seconds(),
        Decimal: decimal_encoder,
        Enum: lambda o: o.value,
        frozenset: list,
        deque: list,
        GeneratorType: list,
        IPv4Address: str,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. bin/diff_yaml.py

                return res
    
            raise
    
    
    def normalize_ports(res):
        try:
            spec = res["spec"]
            if spec is None:
                return res
            ports = sorted(spec['ports'], key=lambda x: x["port"])
            spec['ports'] = ports
    
            return res
        except KeyError as ke:
            if 'spec' in str(ke) or 'ports' in str(ke) or 'port' in str(ke):
                return res
    
            raise
    
    
    Python
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Mar 03 16:14:57 GMT 2021
    - 4.5K bytes
    - Viewed (0)
  5. tests/test_ws_router.py

            assert websocket.receive_text() == "Socket Dependency"
    
    
    def test_router_ws_depends_with_override():
        client = TestClient(app)
        app.dependency_overrides[ws_dependency] = lambda: "Override"  # noqa: E731
        with client.websocket_connect("/router-ws-depends/") as websocket:
            assert websocket.receive_text() == "Override"
    
    
    def test_router_with_params():
        client = TestClient(app)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  6. configure.py

          ask_for_var=(
              'Please specify the (min) Android NDK API level to use. '
              '[Available levels: %s]'
          )
          % api_levels,
          check_success=(lambda *_: True),
          error_msg='Android-%s is not present in the NDK path.',
      )
    
      return android_ndk_api_level
    
    
    def set_gcc_host_compiler_path(environ_cp):
      """Set GCC_HOST_COMPILER_PATH."""
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  7. tests/test_compat.py

        assert field.default is Undefined
    
    
    @needs_pydanticv1
    def test_upload_file_dummy_with_info_plain_validator_function():
        # For coverage
        assert UploadFile.__get_pydantic_core_schema__(str, lambda x: None) == {}
    
    
    @needs_pydanticv1
    def test_union_scalar_list():
        # For coverage
        # TODO: there might not be a current valid code path that uses this, it would
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 2.8K bytes
    - Viewed (0)
Back to top