Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/qr-code-url'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAwiteb committed Nov 24, 2021
2 parents 3f940cd + cb58637 commit d9f8465
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fatoora/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
__author__ = "Awiteb <https://github.com/TheAwiteb>"
__copyright__ = "Copyright (c) 2021 <Awiteb@hotmail.com>"
__license__ = "MIT"
__version__ = version
__version__ = version
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from setuptools import setup, find_packages
import re

KEYWORD = ["fatoora", "Fatoora", "ZATCA", "QR-Code"]

version = "1.1.0"
with open("fatoora/version.py", "r", encoding="utf-8") as f:
version = re.search(
r'^version\s*=\s*"(.*)".*$', f.read(), flags=re.MULTILINE
).group(1)

with open("README.md", "r", encoding="utf-8") as readme_file:
long_description = readme_file.read()
Expand Down
6 changes: 3 additions & 3 deletions tests/fatoora_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
invoice_date=1635872693.3186214, # timestamp
total_amount=100, # or 100.0, 100.00, "100.0", "100.00"
tax_amount=15, # or 15.0, 15.00, "15.0", "15.00"
qrcode_url="https://example.com"
qrcode_url="https://example.com",
)

fatoora_details = {
Expand Down Expand Up @@ -85,9 +85,9 @@ def test_qrcode():
def test_read_qrcode():
dct = Fatoora.read_qrcode(qrcode_filename, dct=True)
base = Fatoora.read_qrcode(qrcode_filename, dct=False)

url = Fatoora.read_qrcode(qrcode_filename_with_url, dct=False)

assert url == fatoora_obj_with_url.qrcode_url
assert base == fatoora_obj_with_url.base64

Expand Down

0 comments on commit d9f8465

Please sign in to comment.