コード例 #1
0
    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'
コード例 #3
0
ファイル: test_wifi.py プロジェクト: amjadm61/ichnaea
    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'
コード例 #4
0
ファイル: test_wifi.py プロジェクト: uvinduperera/ichnaea
    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)
コード例 #6
0
ファイル: observation.py プロジェクト: amjadm61/ichnaea
 def shard_id(self):
     return WifiShard.shard_id(self.mac)