Ejemplo n.º 1
0
    def setUp(self):
        PithosAPITest.setUp(self)
        cnames = ['apples', 'bananas', 'kiwis', 'oranges', 'pears']

        # create containers
        uploaded_bytes = 0
        for cname in cnames:
            self.create_container(cname)

            # upload object
            name, data, resp = self.upload_object(cname)
            uploaded_bytes += len(data)
Ejemplo n.º 2
0
    def setUp(self):
        PithosAPITest.setUp(self)
        self.cname = self.create_container()[0]
        self.oname, self.odata = self.upload_object(self.cname,
                                                    'φωτογραφία.JPG')[:-1]

        self.view_path = join_urls(get_service_path(
            pithos_settings.pithos_services, 'pithos_ui'), 'view')
        self.view_url = join_urls(self.view_path, self.user, self.cname,
                                  self.oname)
        self.api_url = join_urls(self.pithos_path, self.user, self.cname,
                                 self.oname)
Ejemplo n.º 3
0
    def setUp(self):
        PithosAPITest.setUp(self)
        cnames = ['apples', 'bananas', 'kiwis', 'oranges', 'pears']

        # create containers
        uploaded_bytes = 0
        for cname in cnames:
            self.create_container(cname)

            # upload object
            name, data, resp = self.upload_object(cname)
            uploaded_bytes += len(data)
Ejemplo n.º 4
0
    def setUp(self):
        PithosAPITest.setUp(self)
        self.cname = self.create_container()[0]
        self.oname, self.odata = self.upload_object(self.cname,
                                                    'φωτογραφία.JPG')[:-1]

        self.view_path = join_urls(
            get_service_path(pithos_settings.pithos_services, 'pithos_ui'),
            'view')
        self.view_url = join_urls(self.view_path, self.user, self.cname,
                                  self.oname)
        self.api_url = join_urls(self.pithos_path, self.user, self.cname,
                                 self.oname)
Ejemplo n.º 5
0
    def setUp(self):
        PithosAPITest.setUp(self)

        self.cnames = ['pears', 'apples']
        self.objects = {}
        for c in self.cnames:
            self.create_container(c)

        self.objects['pears'] = {}
        for o in o_names[:8]:
            name, data, resp = self.upload_object('pears', o)
            self.objects['pears'][name] = data
        self.objects['apples'] = {}
        for o in o_names[8:]:
            name, data, resp = self.upload_object('apples', o)
            self.objects['apples'][name] = data
Ejemplo n.º 6
0
    def setUp(self):
        PithosAPITest.setUp(self)

        # create a group
        self.users = ['alice', 'bob', 'chuck', 'dan', 'mallory', 'oscar']
        self.groups = {'group1': self.users[:2]}
        kwargs = dict(('HTTP_X_ACCOUNT_GROUP_%s' % k.upper(), ','.join(v)) for
                      k, v in self.groups.items())
        url = join_urls(self.pithos_path, self.user)
        r = self.post(url, **kwargs)
        self.assertEqual(r.status_code, 202)

        self.container = get_random_name()
        self.create_container(self.container)
        self.object = self.upload_object(self.container)[0]
        l = [self.object + '/', self.object + '/a', self.object + 'a',
             self.object + 'a/']
        for i in l:
            self.upload_object(self.container, i)
Ejemplo n.º 7
0
    def setUp(self):
        PithosAPITest.setUp(self)

        # create a group
        self.users = ['alice', 'bob', 'chuck', 'dan', 'mallory', 'oscar']
        self.groups = {'group1': self.users[:2]}
        kwargs = dict(('HTTP_X_ACCOUNT_GROUP_%s' % k.upper(), ','.join(v))
                      for k, v in self.groups.items())
        url = join_urls(self.pithos_path, self.user)
        r = self.post(url, **kwargs)
        self.assertEqual(r.status_code, 202)

        self.container = get_random_name()
        self.create_container(self.container)
        self.object = self.upload_object(self.container)[0]
        l = [
            self.object + '/', self.object + '/a', self.object + 'a',
            self.object + 'a/'
        ]
        for i in l:
            self.upload_object(self.container, i)
Ejemplo n.º 8
0
    def setUp(self):
        PithosAPITest.setUp(self)
        cnames = ['c1', 'c2']

        for c in cnames:
            self.create_container(c)