Exemplo n.º 1
0
 def test_can_see_device_detail(self):
     # a device is created
     device = IpadFactory()
     # goes to its detail page
     res = self.app.get('/devices/ipads/{pk}/'.format(pk=device.pk))
     res.mustcontain(device.name,
                     device.get_verbose_status(),
                     device.get_condition_display(),
                     device.serial_number)
     assert_in('Check-in Comments', res)
Exemplo n.º 2
0
 def test_can_see_devices(self):
     # a device is already created
     device = IpadFactory()
     # goes to the device index
     res = self.app.get('/', user=self.experimenter.user).follow()
     # sees the device name
     res.mustcontain(device.name, 
                     device.get_status_display(), 
                     device.get_condition_display(),
                     device.serial_number)