예제 #1
0
파일: test_linux.py 프로젝트: blin/zabby
    def test_swap_device_names_skips_files(self, mock_lists):
        swap_file_path = '/mnt/swap_file'
        mock_lists.return_value = [[
            'Filename', 'Type', 'Size', 'Used', 'Priority'
        ], ['/dev/dm-0', 'partition', '10485756', '311756',
            '-1'], [swap_file_path, 'file', '524284', '0', '-2']]

        swap_devices = self.linux.swap_device_names()
        assert_not_in(swap_file_path.split('/')[-1], swap_devices)
예제 #2
0
파일: test_linux.py 프로젝트: blin/zabby
    def test_swap_device_names_skips_files(self, mock_lists):
        swap_file_path = '/mnt/swap_file'
        mock_lists.return_value = [
            ['Filename', 'Type', 'Size', 'Used', 'Priority'],
            ['/dev/dm-0', 'partition', '10485756', '311756', '-1'],
            [swap_file_path, 'file', '524284', '0', '-2']]

        swap_devices = self.linux.swap_device_names()
        assert_not_in(swap_file_path.split('/')[-1], swap_devices)
예제 #3
0
 def test_floats_are_not_sent_in_scientific_notation(self):
     self.protocol.send_value(self.client, 1.06828003857e+12)
     sent_message = self.client.sendall.call_args[0][0]
     decoded_message = sent_message.decode('utf-8')
     assert_not_in('e+', decoded_message)
     assert_not_in('E+', decoded_message)