'Iterate/Get on the WMISampler object iterates/gets on its current sample.'

def test_wmi_sampler_iterator_getter(self):

    wmi_sampler = WMISampler('Win32_PerfFormattedData_PerfDisk_LogicalDisk', ['AvgDiskBytesPerWrite', 'FreeMegabytes'])
    wmi_sampler.sample()
    self.assertEquals(len(wmi_sampler), 2)
    for wmi_obj in wmi_sampler:
        self.assertWMIObject(wmi_obj, ['AvgDiskBytesPerWrite', 'FreeMegabytes', 'name'])
    for index in xrange(0, 2):
        self.assertWMIObject(wmi_sampler[index], ['AvgDiskBytesPerWrite', 'FreeMegabytes', 'name'])
