def test_put_older_should_fail(self):
        """This test assumes file version is stored in mtime."""
        src_file = os.path.join(self.temp_dir, 'older.txt')
        with open(src_file, 'wb') as sf:
            sf.write(b'version 1')

        self.client.put_file('/older.txt@1', src_file)

        with open(src_file, 'wb') as sf:
            sf.write(b'version 2')

        self.client.put_file('/older.txt@2', src_file)

        with open(src_file, 'wb') as sf:
            sf.write(b'version 3 (1)')

        self.client.put_file('/older.txt@1', src_file)

        f, _ = self.client.get_stream('/older.txt')
        self.assertEqual(f.read(), b'version 2')
        with self.assertRaises(FiletrackerError):
            self.client.get_stream('/older.txt@1')