Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Cole (0.18 sec)

  1. tests/test_jsonable_encoder.py

        assert jsonable_encoder(subclass_model) == {"dt_field": "2019-01-01T08:00:00+00:00"}
    
    
    def test_encode_model_with_config():
        model = ModelWithConfig(role=RoleEnum.admin)
        assert jsonable_encoder(model) == {"role": "admin"}
    
    
    def test_encode_model_with_alias_raises():
        with pytest.raises(ValidationError):
            ModelWithAlias(foo="Bar")
    
    
    def test_encode_model_with_alias():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/index.md

    This is very useful when you need to:
    
    * Have shared logic (the same code logic again and again).
    * Share database connections.
    * Enforce security, authentication, role requirements, etc.
    * And many other things...
    
    All these, while minimizing code repetition.
    
    ## First Steps
    
    Let's see a very simple example. It will be so simple that it is not very useful, for now.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top