How to get current model schema

Hi All,
i want to create a macro, and put it into test cases.and inside the macro, want to use current schema, somehow, the model is set up to create in schema b. but when i tried to use {{target.schema }}, it always return me schema a. anyone can help me on that? how to capture current model schema?
have three folder under model folder. each of these three folder will be created in different schema, let’s see schema A, schema B, schema C. (the setting is in the dbt_project.yml)
then i create three schema.yml under each folders. in the folder B, it should be created in the schema B. but when i call a macro in the schema.yml under folder B, {{target.schema }} always return schema A,

anyone can help on this?
thanks so much .