fix test with default password passed to getpass
@@ -34,10 +34,14 @@ def test_run_template():
with mock.patch.object(Miner,'forward_text',new=test_forward):
print ('create')
gpt2_exodus_miner = Miner( config = config )
+
with mock.patch.object(gpt2_exodus_miner.neuron.subtensor, 'get_current_block', new=block.block):
bittensor.neuron.subtensor.connect = MagicMock(return_value = True)
bittensor.neuron.subtensor.is_connected = MagicMock(return_value = True)
bittensor.neuron.subtensor.subscribe = MagicMock(return_value = True)
+
+ # setting password to the coldkey as input
+ with mock.patch('getpass.getpass', return_value = 'bit2021NOV'):
gpt2_exodus_miner.run()
assert magic.call_count == 1
