Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,18 @@ def requires_fullFeature(self):
self.client.features.firmware_variant == "EmulatorBTC":
self.skipTest("Full feature firmware required to run this test")

def requires_bitcoinOnly(self):
"""Inverse of requires_fullFeature(): skip unless this IS the
bitcoin-only product.

Usable since the firmware learned to report the variant honestly --
variant_getName() used to answer "Emulator" for both products, so a
bitcoin-only emulator was indistinguishable from a full one and this
guard could not be written.
"""
if self.client.features.firmware_variant not in ("KeepKeyBTC",
"EmulatorBTC"):
self.skipTest("Bitcoin-only firmware required to run this test")



6 changes: 6 additions & 0 deletions tests/test_msg_bitcoin_only_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ class TestBitcoinOnlyVariant(common.KeepKeyTest):
def setUp(self):
super(TestBitcoinOnlyVariant, self).setUp()
self.requires_firmware("7.15.0")
# This whole file describes the BITCOIN-ONLY product. Several tests
# assert screen sequences that differ on the multi-chain build -- the
# OP_RETURN one decodes a THORChain memo there and draws more screens --
# so running them against a full-feature device is a category error, not
# a finding. CI points the pyk suite at the full emulator image.
self.requires_bitcoinOnly()
self.screens = []
# Refuse (press NO) on the Nth ButtonRequest of the current flow;
# None means confirm everything.
Expand Down
Loading