Skip to content

Commit

Permalink
adjust tests after dc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philkra committed May 28, 2024
1 parent 8a692a3 commit 8fc6437
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tests/integration-tests/files_upload_url_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,16 @@

import utils

import logging

from requests import request
from xata.client import XataClient

logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)

class TestFilesSingleFile(object):
def setup_class(self):
self.db_name = utils.get_db_name()
self.db_name = "Testing-DC-from-Philip"

self.branch_name = "main"
self.client = XataClient(db_name=self.db_name, branch_name=self.branch_name)
self.fake = utils.get_faker()

"""
assert self.client.databases().create(self.db_name).is_success()
assert self.client.table().create("Attachments").is_success()
assert (
Expand All @@ -49,11 +41,9 @@ def setup_class(self):
)
.is_success()
)
"""

def teardown_class(self):
#assert self.client.databases().delete(self.db_name).is_success()
pass
assert self.client.databases().delete(self.db_name).is_success()

def test_upload_file(self):
payload = {"title": self.fake.catch_phrase()}
Expand All @@ -64,7 +54,6 @@ def test_upload_file(self):
gif = utils.get_file_content(utils.get_file_name("images/01.gif"))

resp = self.client.files().put("Attachments", rid, "one_file", gif)
assert resp.status_code == ""
assert resp.is_success()

record = self.client.records().get("Attachments", rid, columns=["one_file.*", "one_file.uploadUrl"])
Expand Down

0 comments on commit 8fc6437

Please sign in to comment.