'Test self.vg.vg_thin_pool is set to pool_name
See bug #1220286 for more info.'

def test_volume_create_after_thin_creation(self):

    vg_name = 'vg-name'
    pool_name = (vg_name + '-pool')
    self.vg.create_thin_pool(pool_name, '1G')
    with mock.patch.object(self.vg, '_execute'):
        self.vg.create_volume('test', '1G', lv_type='thin')
        if (self.configuration.lvm_suppress_fd_warnings is False):
            self.vg._execute.assert_called_once_with('env', 'LC_ALL=C', 'lvcreate', '-T', '-V', '1G', '-n', 'test', 'fake-vg/vg-name-pool', root_helper='sudo', run_as_root=True)
        else:
            self.vg._execute.assert_called_once_with('env', 'LC_ALL=C', 'LVM_SUPPRESS_FD_WARNINGS=1', 'lvcreate', '-T', '-V', '1G', '-n', 'test', 'fake-vg/vg-name-pool', root_helper='sudo', run_as_root=True)
    self.assertEqual(pool_name, self.vg.vg_thin_pool)
