'Check whether credit mining get and set methods are working as expected.'

def test_get_set_methods_credit_mining(self):

    self.tribler_config.set_credit_mining_enabled(True)
    self.assertEqual(self.tribler_config.get_credit_mining_enabled(), True)
    self.tribler_config.set_credit_mining_archive_sources(True)
    self.assertEqual(self.tribler_config.get_credit_mining_archive_sources(), True)
    self.tribler_config.set_credit_mining_max_torrents_per_source(True)
    self.assertEqual(self.tribler_config.get_credit_mining_max_torrents_per_source(), True)
    self.tribler_config.set_credit_mining_max_torrents_active(True)
    self.assertEqual(self.tribler_config.get_credit_mining_max_torrents_active(), True)
    self.tribler_config.set_credit_mining_source_interval(True)
    self.assertEqual(self.tribler_config.get_credit_mining_source_interval(), True)
    self.tribler_config.set_credit_mining_swarm_interval(True)
    self.assertEqual(self.tribler_config.get_credit_mining_swarm_interval(), True)
    self.tribler_config.set_credit_mining_share_mode_target(True)
    self.assertEqual(self.tribler_config.get_credit_mining_share_mode_target(), True)
    self.tribler_config.set_credit_mining_tracker_interval(True)
    self.assertEqual(self.tribler_config.get_credit_mining_tracker_interval(), True)
    self.tribler_config.set_credit_mining_logging_interval(True)
    self.assertEqual(self.tribler_config.get_credit_mining_logging_interval(), True)
    self.tribler_config.set_credit_mining_sources(True, 'boosting_sources')
    self.tribler_config.set_credit_mining_sources(True, 'boosting_enabled')
    self.tribler_config.set_credit_mining_sources(True, 'boosting_disabled')
    self.tribler_config.set_credit_mining_sources(True, 'archive_sources')
    expected_dict = {'boosting_sources': True, 'boosting_enabled': True, 'boosting_disabled': True, 'archive_sources': True}
    self.assertEqual(self.tribler_config.get_credit_mining_sources(), expected_dict)
    self.tribler_config.set_credit_mining_policy(True)
    self.assertEqual(self.tribler_config.get_credit_mining_policy(), True)
    self.tribler_config.set_credit_mining_policy('random')
    self.assertEqual(self.tribler_config.get_credit_mining_policy(), 'random')
    self.assertEqual(self.tribler_config.get_credit_mining_policy(True), RandomPolicy)
