def test_shard_id(self): self.assertEqual(WifiShard.shard_id('111101123456'), '0') self.assertEqual(WifiShard.shard_id('0000f0123456'), 'f') self.assertEqual(WifiShard.shard_id(''), None) self.assertEqual(WifiShard.shard_id(None), None) mac = encode_mac('0000f0123456') self.assertEqual(WifiShard.shard_id(mac), 'f')
def test_shard_id(self): assert WifiShard.shard_id('111101123456') == '0' assert WifiShard.shard_id('0000f0123456') == 'f' assert WifiShard.shard_id('') is None assert WifiShard.shard_id(None) is None mac = encode_mac('0000f0123456') assert WifiShard.shard_id(mac) == 'f'
def test_shard_id(self): assert WifiShard.shard_id("111101123456") == "0" assert WifiShard.shard_id("0000f0123456") == "f" assert WifiShard.shard_id("") is None assert WifiShard.shard_id(None) is None mac = encode_mac("0000f0123456") assert WifiShard.shard_id(mac) == "f"
def shard_id(self): return WifiShard.shard_id(self.mac)