diff --git a/.circleci/config.yml b/.circleci/config.yml index 721990d..cf2f9de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: docker: # specify the version you desire here # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:2.7.15 + - image: circleci/python:3.6.6 # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images @@ -52,4 +52,4 @@ jobs: - store_artifacts: path: test-reports - destination: test-reports \ No newline at end of file + destination: test-reports diff --git a/requirements.txt b/requirements.txt index 9e8b7cd..527abab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,6 @@ cryptography==2.3 curtsies==0.3.0 enum34==1.1.6 funcsigs==1.0.2 -futures==3.2.0 greenlet==0.4.13 idna==2.7 ipaddress==1.0.22 diff --git a/tests.py b/tests.py index b793e67..a49b68c 100644 --- a/tests.py +++ b/tests.py @@ -43,7 +43,7 @@ def test_create_file_and_retrieve_by_id(self): :return: None """ bucket = self.b2.buckets.get(bucket_name=self.bucket_name) - file = bucket.files.upload(contents='Hello World!', file_name='test/hello.txt') + file = bucket.files.upload(contents='Hello World!'.encode('utf-8'), file_name='test/hello.txt') file2 = bucket.files.get(file_id=file.file_id) def test_create_z_binary_file(self): @@ -102,7 +102,10 @@ def test_get_buckets(self): :return: None """ buckets = self.b2.buckets.all() - expect(len(buckets)).should.be.greater_than(1) + expect(len(buckets)).should.be.greater_than(0) + current_bucket = None + assert any(bucket for bucket in buckets if bucket.bucket_name == self.bucket_name) == True + def test_get_files(self): """