tests: Separate (most of) the python code from the AAL for ResNat