difftreelog
test fix mocks
in: master
3 files changed
pallets/inflation/src/tests.rsdiffbeforeafterboth7 parameter_types,7 parameter_types,8};8};9use frame_support::{traits::OnInitialize};9use frame_support::{10 traits::{OnInitialize, Everything},11};10use sp_core::H256;12use sp_core::H256;11use sp_runtime::{13use sp_runtime::{55}57}565857impl frame_system::Config for Test {59impl frame_system::Config for Test {58 type BaseCallFilter = ();60 type BaseCallFilter = Everything;59 type BlockWeights = ();61 type BlockWeights = ();60 type BlockLength = ();62 type BlockLength = ();61 type DbWeight = ();63 type DbWeight = ();pallets/nft/src/mock.rsdiffbeforeafterboth223use crate as pallet_template;3use crate as pallet_template;4use sp_core::H256;4use sp_core::H256;5use frame_support::{parameter_types, weights::IdentityFee};5use frame_support::{parameter_types, traits::Everything, weights::IdentityFee};6use sp_runtime::{6use sp_runtime::{7 traits::{BlakeTwo256, IdentityLookup},7 traits::{BlakeTwo256, IdentityLookup},8 testing::Header,8 testing::Header,12use pallet_evm::AddressMapping;12use pallet_evm::AddressMapping;13use crate::{EvmBackwardsAddressMapping, CrossAccountId};13use crate::{EvmBackwardsAddressMapping, CrossAccountId};14use codec::{Encode, Decode};14use codec::{Encode, Decode};15use scale_info::TypeInfo;151616type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;17type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;17type Block = frame_system::mocking::MockBlock<Test>;18type Block = frame_system::mocking::MockBlock<Test>;35}36}363737impl system::Config for Test {38impl system::Config for Test {38 type BaseCallFilter = ();39 type BaseCallFilter = Everything;39 type BlockWeights = ();40 type BlockWeights = ();40 type BlockLength = ();41 type BlockLength = ();41 type DbWeight = ();42 type DbWeight = ();798080parameter_types! {81parameter_types! {81 pub const TransactionByteFee: u64 = 1;82 pub const TransactionByteFee: u64 = 1;83 pub const OperationalFeeMultiplier: u8 = 5;82}84}838584impl pallet_transaction_payment::Config for Test {86impl pallet_transaction_payment::Config for Test {85 type OnChargeTransaction = CurrencyAdapter<pallet_balances::Pallet<Test>, ()>;87 type OnChargeTransaction = CurrencyAdapter<pallet_balances::Pallet<Test>, ()>;86 type TransactionByteFee = TransactionByteFee;88 type TransactionByteFee = TransactionByteFee;87 type WeightToFee = IdentityFee<u64>;89 type WeightToFee = IdentityFee<u64>;88 type FeeMultiplierUpdate = ();90 type FeeMultiplierUpdate = ();91 type OperationalFeeMultiplier = OperationalFeeMultiplier;89}92}909391parameter_types! {94parameter_types! {118 }121 }119}122}120123121#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]124#[derive(Encode, Decode, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, TypeInfo)]122pub struct TestCrossAccountId(u64, sp_core::H160);125pub struct TestCrossAccountId(u64, sp_core::H160);123impl CrossAccountId<u64> for TestCrossAccountId {126impl CrossAccountId<u64> for TestCrossAccountId {124 fn from_sub(sub: u64) -> Self {127 fn from_sub(sub: u64) -> Self {pallets/scheduler/src/lib.rsdiffbeforeafterboth796796797 use frame_support::{797 use frame_support::{798 Hashable, assert_err, assert_noop, assert_ok, ord_parameter_types, parameter_types,798 Hashable, assert_err, assert_noop, assert_ok, ord_parameter_types, parameter_types,799 traits::{Contains, Filter, OnFinalize, OnInitialize},799 traits::{Contains, OnFinalize, OnInitialize},800 weights::constants::RocksDbWeight,800 weights::constants::RocksDbWeight,801 };801 };802 use sp_core::H256;802 use sp_core::H256;873 pub struct BaseFilter;873 pub struct BaseFilter;874 impl Contains<Call> for BaseFilter {874 impl Contains<Call> for BaseFilter {875 fn contains(call: &Call) -> bool {875 fn contains(call: &Call) -> bool {876 !matches!(call, Call::Logger(logger::Call::log(_, _)))876 !matches!(call, Call::Logger(logger::Call::log { .. }))877 }877 }878 }878 }879879