Revision 3e5bbd85 snf-tools/synnefo_tools/burnin/pithos_tests.py

b/snf-tools/synnefo_tools/burnin/pithos_tests.py
36 36

  
37 37
"""
38 38

  
39
import os
39 40
import random
40 41
import tempfile
41 42

  
......
90 91
            # Upload the file,
91 92
            # The container is the one choosen during the `create_container'
92 93
            self.clients.pithos.upload_object("test.txt", fout)
94
            # Verify quotas
95
            self._check_quotas(diskspace=+os.fstat(fout.fileno()).st_size)
93 96

  
94 97
    def test_005_download_file(self):
95 98
        """Test downloading the file from Pithos"""
......
108 111
        self.info("Removing the file %s from container %s",
109 112
                  "test.txt", self.created_container)
110 113
        # The container is the one choosen during the `create_container'
114
        content_length = \
115
            self.clients.pithos.get_object_info("test.txt")['content-length']
111 116
        self.clients.pithos.del_object("test.txt")
112 117

  
118
        # Verify quotas
119
        self._check_quotas(diskspace=-int(content_length))
120

  
113 121
        self.info("Removing the container %s", self.created_container)
114 122
        self.clients.pithos.purge_container()
115 123

  

Also available in: Unified diff