Add unittest for appcontext_tearing_down signal