Skip to content

Commit

Permalink
tests for full fit-in
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed Jul 10, 2014
1 parent 9101ee4 commit d01eb79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/test_cryptourl.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_decryption_fit_in():
'''

crypto = CryptoURL(KEY)
url = crypto.generate(image_url=IMAGE_URL, fit_in=True, old=True)
url = crypto.generate(image_url=IMAGE_URL, fit_in=True, width=300, height=200, old=True)
decrypted = decrypt_in_thumbor(url)

assert decrypted['fit_in'] == True
Expand Down
10 changes: 4 additions & 6 deletions tests/test_url_composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_fit_in_fails_if_no_width_supplied():
except ValueError:
err = sys.exc_info()[1]
assert err is not None
finally:
else:
assert False, "Should not have gotten this far"

def test_full_fit_in_fails_if_no_width_supplied():
Expand All @@ -244,7 +244,7 @@ def test_full_fit_in_fails_if_no_width_supplied():
except ValueError:
err = sys.exc_info()[1]
assert err is not None
finally:
else:
assert False, "Should not have gotten this far"

def test_adaptive_fit_in_fails_if_no_width_supplied():
Expand All @@ -253,7 +253,7 @@ def test_adaptive_fit_in_fails_if_no_width_supplied():
except ValueError:
err = sys.exc_info()[1]
assert err is not None
finally:
else:
assert False, "Should not have gotten this far"

def test_adaptive_full_fit_in_fails_if_no_width_supplied():
Expand All @@ -262,11 +262,9 @@ def test_adaptive_full_fit_in_fails_if_no_width_supplied():
except ValueError:
err = sys.exc_info()[1]
assert err is not None
finally:
else:
assert False, "Should not have gotten this far"



def test_full_fit_in_url():
'''test_full_fit_in_url
Given
Expand Down

0 comments on commit d01eb79

Please sign in to comment.