Revision 776b275c kamaki/clients/livetest/pithos.py

b/kamaki/clients/livetest/pithos.py
556 556
        r = self.client.object_head(obj)
557 557
        self.assertEqual(r.status_code, 200)
558 558
        etag = r.headers['etag']
559
        real_version = r.headers['x-object-version']
559 560

  
560
        r = self.client.object_head(obj, version=40)
561
        self.assertEqual(r.headers['x-object-version'], '40')
561
        self.assertRaises(
562
            ClientError, self.client.object_head, obj, version=-10)
563
        r = self.client.object_head(obj, version=real_version)
564
        self.assertEqual(r.headers['x-object-version'], real_version)
562 565

  
563 566
        r = self.client.object_head(obj, if_etag_match=etag)
564 567
        self.assertEqual(r.status_code, 200)
......
568 571
        self.assertNotEqual(r.status_code, 200)
569 572

  
570 573
        r = self.client.object_head(
571
            obj, version=40, if_etag_match=etag, success=412)
572
        self.assertEqual(r.status_code, 412)
574
            obj, version=real_version, if_etag_match=etag, success=200)
575
        self.assertEqual(r.status_code, 200)
573 576

  
574 577
        """Check and if(un)modified_since"""
575 578
        for format in self.client.DATE_FORMATS:
......
1254 1257

  
1255 1258
    def create_large_file(self, size):
1256 1259
        """Create a large file at fs"""
1260
        print
1257 1261
        self.files.append(NamedTemporaryFile())
1258 1262
        f = self.files[-1]
1259 1263
        Ki = size / 8

Also available in: Unified diff