コード例 #1
0
    def setUp(self):
        def noop():
            return None

        mock_conf_settings(self)
        util.resetTime(self)
        self.test_daemon = get_test_daemon()
        self.test_daemon.session.wallet.is_first_run = False
        self.test_daemon.session.wallet.get_best_blockhash = noop
コード例 #2
0
ファイル: test_Daemon.py プロジェクト: zhilinwww/lbry
    def setUp(self):
        def noop():
            return None

        mock_conf_settings(self)
        util.resetTime(self)
        self.test_daemon = get_test_daemon()
        self.test_daemon.session.wallet = Wallet.LBRYumWallet(storage=Wallet.InMemoryStorage())
        self.test_daemon.session.wallet.network = FakeNetwork()
        self.test_daemon.session.wallet.get_best_blockhash = noop
コード例 #3
0
    def setUp(self):
        def noop():
            return None

        mock_conf_settings(self)
        util.resetTime(self)
        self.test_daemon = get_test_daemon()
        self.test_daemon.session.wallet = Wallet.LBRYumWallet(storage=Wallet.InMemoryStorage())
        self.test_daemon.session.wallet.network = FakeNetwork()
        self.test_daemon.session.wallet.get_best_blockhash = noop
コード例 #4
0
    def setUp(self):
        mock_conf_settings(self)
        util.resetTime(self)
        self.faker = Faker('en_US')
        self.faker.seed(66410)
        self.test_daemon = get_test_daemon()
        self.test_daemon.lbry_file_manager = mock.Mock(spec=EncryptedFileManager)
        self.test_daemon.lbry_file_manager.lbry_files = self._get_fake_lbry_files()

        # Pre-sorted lists of prices and file names in ascending order produced by
        # faker with seed 66410. This seed was chosen becacuse it produces 3 results
        # 'points_paid' at 6.0 and 2 results at 4.5 to test multiple sort criteria.
        self.test_points_paid = [0.2, 2.9, 4.5, 4.5, 6.0, 6.0, 6.0, 6.8, 7.1, 9.2]
        self.test_file_names = ['also.mp3', 'better.css', 'call.mp3', 'pay.jpg',
                                'record.pages', 'sell.css', 'strategy.pages',
                                'thousand.pages', 'town.mov', 'vote.ppt']
        self.test_authors = ['angela41', 'edward70', 'fhart', 'johnrosales',
                             'lucasfowler', 'peggytorres', 'qmitchell',
                             'trevoranderson', 'xmitchell', 'zhangsusan']
コード例 #5
0
ファイル: test_Daemon.py プロジェクト: nasht12/lbry
 def setUp(self):
     mock_conf_settings(self)
     util.resetTime(self)
     self.faker = Faker('en_US')
     self.faker.seed(66410)
     self.test_daemon = get_test_daemon()
     self.test_daemon.file_manager.lbry_files = self._get_fake_lbry_files()
     # Pre-sorted lists of prices and file names in ascending order produced by
     # faker with seed 66410. This seed was chosen becacuse it produces 3 results
     # 'points_paid' at 6.0 and 2 results at 4.5 to test multiple sort criteria.
     self.test_points_paid = [
         0.2, 2.9, 4.5, 4.5, 6.0, 6.0, 6.0, 6.8, 7.1, 9.2
     ]
     self.test_file_names = [
         'alias.mp3', 'atque.css', 'commodi.mp3', 'nulla.jpg',
         'praesentium.pages', 'quidem.css', 'rerum.pages', 'suscipit.pages',
         'temporibus.mov', 'velit.ppt'
     ]
     self.test_authors = [
         'angela41', 'edward70', 'fhart', 'johnrosales', 'lucasfowler',
         'peggytorres', 'qmitchell', 'trevoranderson', 'xmitchell',
         'zhangsusan'
     ]
     return self.test_daemon.component_manager.setup()
コード例 #6
0
 def setUp(self):
     util.resetTime(self)
コード例 #7
0
ファイル: test_Daemon.py プロジェクト: gaceladri/lbry
 def setUp(self):
     mock_conf_settings(self)
     util.resetTime(self)
コード例 #8
0
 def setUp(self):
     util.resetTime(self)
コード例 #9
0
ファイル: test_Daemon.py プロジェクト: zhilinwww/lbry
 def setUp(self):
     mock_conf_settings(self)
     util.resetTime(self)