message: fix api_tests/deferred_transaction_tests
diff: @@ -909,17 +909,26 @@ BOOST_FIXTURE_TEST_CASE(deferred_transaction_tests, TESTER) { try {
  dtt_act2.deferred_account = N(testapi2);
  dtt_act2.permission_name = N(additional);
  dtt_act2.delay_sec = 5;
  +
  + auto auth = authority(get_public_key("testapi", name(dtt_act2.permission_name).to_string()), 10);
  + auth.accounts.push_back( permission_level_weight{{N(testapi), config::eosio_code_name}, 1} );
  +
  push_action(config::system_account_name, updateauth::get_name(), "testapi", fc::mutable_variant_object()
  ("account", "testapi")
  ("permission", name(dtt_act2.permission_name))
  ("parent", "active")
  - ("auth", authority(get_public_key("testapi", name(dtt_act2.permission_name).to_string()), 10)));
  + ("auth", auth)
  + );
  push_action(config::system_account_name, linkauth::get_name(), "testapi", fc::mutable_variant_object()
  ("account", "testapi")
  ("code", name(dtt_act2.deferred_account))
  ("type", name(dtt_act2.deferred_action))
  ("requirement", name(dtt_act2.permission_name)));
  - BOOST_CHECK_THROW(CALL_TEST_FUNCTION(*this, "test_transaction", "send_deferred_tx_with_dtt_action", fc::raw::pack(dtt_act2)), insufficient_delay_exception);
  + BOOST_CHECK_THROW(CALL_TEST_FUNCTION(*this, "test_transaction", "send_deferred_tx_with_dtt_action", fc::raw::pack(dtt_act2)), unsatisfied_authorization);
  +
  + // But if the deferred transaction has a sufficient delay, then it should work.
  + dtt_act2.delay_sec = 10;
  + CALL_TEST_FUNCTION(*this, "test_transaction", "send_deferred_tx_with_dtt_action", fc::raw::pack(dtt_act2));
  // Meanwhile, if the deferred tx receiver == this tx receiver, the delay will be ignored, this tx should succeed
  dtt_action dtt_act3;
  