Skip to content

Commit

Permalink
Merge pull request #282 from uploadcare/bugfix/fix_integration_tests
Browse files Browse the repository at this point in the history
Fix integration tests
  • Loading branch information
evgkirov committed Feb 2, 2024
2 parents 824c1b6 + 877fe1c commit 9a7764f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Uploadcare, Inc
Copyright (c) 2024 Uploadcare, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

# General information about the project.
project = "PyUploadcare"
copyright = "2011-2023, Uploadcare Inc"
copyright = "2011-2024, Uploadcare Inc"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
13 changes: 6 additions & 7 deletions tests/integration/test_api_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
# increase throttle retries for Travis CI
conf.retry_throttled = 10

IMAGE_URL = (
"https://github.githubassets.com/images/modules/logos_page/Octocat.png"
)
IMAGE_URL = "https://octodex.github.com/images/original.png"
IMAGE_FILENAME = "original.png"

ASSETS_PATH = Path(__file__).parent / "assets"
IMAGE_PATH = ASSETS_PATH / "img.png"
Expand Down Expand Up @@ -106,15 +105,15 @@ def test_successful_upload_from_url(uploadcare):
def test_successful_upload_from_url_sync_autostore(uploadcare):
file = uploadcare.upload_from_url_sync(IMAGE_URL, interval=1)
assert isinstance(file, File)
assert file.filename == "Octocat.png"
assert file.filename == IMAGE_FILENAME
assert file.datetime_stored is not None
assert isinstance(file.datetime_stored, datetime)


def test_successful_upload_by_url(uploadcare):
file = uploadcare.upload(IMAGE_URL)
assert isinstance(file, File)
assert file.filename == "Octocat.png"
assert file.filename == IMAGE_FILENAME


def test_successful_upload_from_url_signed(uploadcare):
Expand Down Expand Up @@ -148,15 +147,15 @@ def test_successful_upload_from_url_check_duplicates(uploadcare):
def test_successful_upload_from_url_sync_autostore_signed(uploadcare):
file = uploadcare.upload_from_url_sync(IMAGE_URL, interval=1)
assert isinstance(file, File)
assert file.filename == "Octocat.png"
assert file.filename == IMAGE_FILENAME
assert file.datetime_stored is not None
assert isinstance(file.datetime_stored, datetime)


def test_successful_upload_from_url_sync_dont_store(uploadcare):
file = uploadcare.upload_from_url_sync(IMAGE_URL, store=False, interval=1)
assert isinstance(file, File)
assert file.filename == "Octocat.png"
assert file.filename == IMAGE_FILENAME
assert file.datetime_stored is None


Expand Down

0 comments on commit 9a7764f

Please sign in to comment.