From 98b6f5e9c408aee98bbfc36a44d165c11e3295d8 Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Thu, 5 May 2022 18:17:53 -0600 Subject: [PATCH] Add tests --- src/accounts/fixtures/accounts.json | 1 + src/accounts/utils.py | 4 +- src/core/fixtures/products.json | 1 + src/fixtures/db.json | 1 + src/functional_tests/__init__.py | 0 src/functional_tests/tests_home.py | 32 ++++++++ src/storefront/cart.py | 5 +- src/storefront/payments.py | 20 ++--- src/storefront/tests/__init__.py | 43 ++++++++++ .../{tests.py => tests/test_cart.py} | 79 +++++++------------ src/storefront/tests/test_payments.py | 73 +++++++++++++++++ src/storefront/views.py | 1 - 12 files changed, 197 insertions(+), 63 deletions(-) create mode 100644 src/accounts/fixtures/accounts.json create mode 100644 src/core/fixtures/products.json create mode 100644 src/fixtures/db.json create mode 100644 src/functional_tests/__init__.py create mode 100644 src/functional_tests/tests_home.py create mode 100644 src/storefront/tests/__init__.py rename src/storefront/{tests.py => tests/test_cart.py} (76%) create mode 100644 src/storefront/tests/test_payments.py diff --git a/src/accounts/fixtures/accounts.json b/src/accounts/fixtures/accounts.json new file mode 100644 index 0000000..fe40708 --- /dev/null +++ b/src/accounts/fixtures/accounts.json @@ -0,0 +1 @@ +[{"model": "accounts.address", "pk": 1, "fields": {"first_name": "Nathan", "last_name": "Chapman", "street_address_1": "1504 N 230 E", "street_address_2": "", "city": "North Logan", "state": "UT", "postal_code": "84341"}}, {"model": "accounts.address", "pk": 2, "fields": {"first_name": "Nathan", "last_name": "Chapman", "street_address_1": "1125 W 400 N", "street_address_2": "", "city": "Logan", "state": "UT", "postal_code": "84321"}}, {"model": "accounts.user", "pk": 1, "fields": {"password": "pbkdf2_sha256$320000$VLksxVkUXOtoAEthHFi6DB$xj+81uh6NwPfZFP+7agf2UAJQZN89j5Wt38gUXeJ3z0=", "last_login": "2022-05-03T23:58:18.358Z", "is_superuser": true, "username": "nathanchapman", "first_name": "Nathan", "last_name": "Chapman", "email": "contact@nathanjchapman.com", "is_staff": true, "is_active": true, "date_joined": "2022-04-28T01:24:47.591Z", "default_shipping_address": 1, "default_billing_address": null, "groups": [], "user_permissions": [], "addresses": []}}, {"model": "accounts.user", "pk": 13, "fields": {"password": "pbkdf2_sha256$320000$L6WDkOMJwmkjR9OVsXfsIj$otr4goV5Tz5Hy5l24UkSYcH0L9Y5hDD89GKYD6LGcZo=", "last_login": null, "is_superuser": false, "username": "john", "first_name": "John", "last_name": "Doe", "email": "john@example.com", "is_staff": false, "is_active": true, "date_joined": "2022-05-04T00:00:11Z", "default_shipping_address": null, "default_billing_address": null, "groups": [], "user_permissions": [], "addresses": []}}] \ No newline at end of file diff --git a/src/accounts/utils.py b/src/accounts/utils.py index 5406e4d..16a2c71 100644 --- a/src/accounts/utils.py +++ b/src/accounts/utils.py @@ -16,9 +16,10 @@ def get_or_create_customer(request, form, shipping_address): if request.user.is_authenticated: user = request.user + user.addresses.add(address) if not user.default_shipping_address: user.default_shipping_address = address - user.save() + user.save() else: user, u_created = User.objects.get_or_create( email=form.cleaned_data['email'], @@ -35,6 +36,7 @@ def get_or_create_customer(request, form, shipping_address): if u_created: password = User.objects.make_random_password() user.set_password(password) + user.addresses.add(address) user.save() EmailAddress.objects.create(user=user, email=user.email, primary=True, verified=False) diff --git a/src/core/fixtures/products.json b/src/core/fixtures/products.json new file mode 100644 index 0000000..0cba8ba --- /dev/null +++ b/src/core/fixtures/products.json @@ -0,0 +1 @@ +[{"model": "core.product", "pk": 1, "fields": {"name": "Ethiopia", "description": "Spicy espresso reminiscent of Northern Italy, on the mild side. Perfect for espresso, and steamed milk drinks. Also, a full-bodied, earthy sweet drip or Americano. Contains organic beans from Indonesia, Africa and America.", "sku": "23468", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 4, "created_at": "2022-02-19T20:15:36.292Z", "updated_at": "2022-03-28T17:29:26.300Z"}}, {"model": "core.product", "pk": 2, "fields": {"name": "Sumatra", "description": "Dark heavy-bodied roast with a lingering chocolatey taste. Organic Single origin.", "sku": "89765", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 3, "created_at": "2022-02-19T20:15:59.741Z", "updated_at": "2022-03-28T17:29:08.706Z"}}, {"model": "core.product", "pk": 3, "fields": {"name": "Pantomime", "description": "Very Dark French Roast\r\nOur darkest drip. A blend of five different beans roasted two ways. Organic Africa, Indonesia, and South and Central America.", "sku": "565656", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 1, "created_at": "2022-02-23T17:59:00.711Z", "updated_at": "2022-03-28T17:28:58.670Z"}}, {"model": "core.product", "pk": 4, "fields": {"name": "Decaf", "description": "French Roast (Water Processed)\r\n\r\n“I can’t believe it’s decaf!”. The best-tasting Swiss water process decaf we have developed over the past 30 years, for an unbelievable espresso or drip coffee. Organic Africa, Indonesia and South and Central America.", "sku": "566565", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 2, "created_at": "2022-02-23T17:59:32.099Z", "updated_at": "2022-03-28T17:28:45.512Z"}}, {"model": "core.product", "pk": 5, "fields": {"name": "Moka Java Blend", "description": "Dark Roast\r\n\r\nA classic Moka Java style blend dark roasted with organic beans for a perfect body and sweetness with a hint of citrus.", "sku": "56466", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": false, "sorting": 5, "created_at": "2022-02-23T18:05:41.742Z", "updated_at": "2022-03-28T17:29:39.761Z"}}, {"model": "core.product", "pk": 6, "fields": {"name": "Loop d’ Loop", "description": "Mild Dark Roast\r\n\r\nOur most popular blend reminiscent of Central Italy. A dark, chocolaty flavor perfect for espresso or drip. It’s dark Vienna roast properties make it ideal for steamed milk drinks. Organic Indonesia, Africa and America.", "sku": "53264", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 6, "created_at": "2022-02-23T18:06:09.881Z", "updated_at": "2022-03-28T17:29:53.104Z"}}, {"model": "core.product", "pk": 7, "fields": {"name": "Dante’s Tornado", "description": "Medium Roast\r\n\r\nFull City spicy espresso roast reminiscent of Northern Italy, on the mild side. A full- bodied, earthy sweet drip or Americano. Organic Indonesia, Africa and America.", "sku": "78945", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 7, "created_at": "2022-02-23T18:06:35.593Z", "updated_at": "2022-03-28T17:30:11.445Z"}}, {"model": "core.product", "pk": 8, "fields": {"name": "Nicaragua", "description": "Mild Roast\r\n\r\nOur mildest roast with sweet and fruity notes, containing organic beans from Nicaragua. Single origin.", "sku": "12365", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 8, "created_at": "2022-02-23T18:06:57.624Z", "updated_at": "2022-03-28T17:30:20.941Z"}}, {"model": "core.productphoto", "pk": 1, "fields": {"product": 1, "image": "products/images/slice2.png"}}, {"model": "core.productphoto", "pk": 2, "fields": {"product": 2, "image": "products/images/slice1.png"}}, {"model": "core.productphoto", "pk": 5, "fields": {"product": 5, "image": "products/images/moka_java.png"}}, {"model": "core.productphoto", "pk": 6, "fields": {"product": 6, "image": "products/images/loop_d_loop.png"}}, {"model": "core.productphoto", "pk": 7, "fields": {"product": 7, "image": "products/images/dantes_tornado.png"}}, {"model": "core.productphoto", "pk": 8, "fields": {"product": 8, "image": "products/images/nicaragua.png"}}, {"model": "core.productphoto", "pk": 15, "fields": {"product": 3, "image": "products/images/pantomime_800.png"}}, {"model": "core.productphoto", "pk": 16, "fields": {"product": 3, "image": "products/images/pantomime_beans.png"}}, {"model": "core.productphoto", "pk": 18, "fields": {"product": 2, "image": "products/images/pantomime_beans_J2bFBiH.png"}}, {"model": "core.productphoto", "pk": 19, "fields": {"product": 4, "image": "products/images/decaf_800.png"}}, {"model": "core.productphoto", "pk": 20, "fields": {"product": 4, "image": "products/images/pantomime_beans_Lo0hJRx.png"}}] \ No newline at end of file diff --git a/src/fixtures/db.json b/src/fixtures/db.json new file mode 100644 index 0000000..43998b5 --- /dev/null +++ b/src/fixtures/db.json @@ -0,0 +1 @@ +[{"model": "admin.logentry", "pk": 1, "fields": {"action_time": "2022-03-15T16:21:20.886Z", "user": 1, "content_type": 29, "object_id": "1", "object_repr": "ptcoffee.com", "action_flag": 2, "change_message": "[{\"changed\": {\"fields\": [\"Domain name\", \"Display name\"]}}]"}}, {"model": "admin.logentry", "pk": 2, "fields": {"action_time": "2022-03-15T18:37:29.612Z", "user": 1, "content_type": 21, "object_id": "1", "object_repr": "nathanchapman", "action_flag": 2, "change_message": "[{\"changed\": {\"fields\": [\"First name\", \"Last name\"]}}]"}}, {"model": "admin.logentry", "pk": 3, "fields": {"action_time": "2022-04-01T17:09:11.523Z", "user": 1, "content_type": 24, "object_id": "1", "object_repr": "Coupon object (1)", "action_flag": 2, "change_message": "[{\"changed\": {\"fields\": [\"Valid to\"]}}]"}}, {"model": "admin.logentry", "pk": 4, "fields": {"action_time": "2022-04-02T01:41:32.819Z", "user": 1, "content_type": 29, "object_id": "1", "object_repr": "localhost", "action_flag": 2, "change_message": "[{\"changed\": {\"fields\": [\"Domain name\"]}}]"}}, {"model": "admin.logentry", "pk": 5, "fields": {"action_time": "2022-04-06T00:22:10.532Z", "user": 1, "content_type": 21, "object_id": "4", "object_repr": "joseph", "action_flag": 2, "change_message": "[{\"changed\": {\"fields\": [\"Username\", \"First name\", \"Last name\", \"Staff status\", \"Last login\"]}}]"}}, {"model": "admin.logentry", "pk": 6, "fields": {"action_time": "2022-04-27T01:12:15.755Z", "user": 1, "content_type": 21, "object_id": "6", "object_repr": "", "action_flag": 3, "change_message": ""}}, {"model": "admin.logentry", "pk": 7, "fields": {"action_time": "2022-04-27T01:12:15.766Z", "user": 1, "content_type": 21, "object_id": "5", "object_repr": "cnathan036@gmail.com", "action_flag": 3, "change_message": ""}}, {"model": "admin.logentry", "pk": 8, "fields": {"action_time": "2022-04-27T01:12:15.776Z", "user": 1, "content_type": 21, "object_id": "4", "object_repr": "joseph", "action_flag": 3, "change_message": ""}}, {"model": "admin.logentry", "pk": 9, "fields": {"action_time": "2022-04-27T01:12:15.786Z", "user": 1, "content_type": 21, "object_id": "3", "object_repr": "nathanchapman@hey.com", "action_flag": 3, "change_message": ""}}, {"model": "admin.logentry", "pk": 10, "fields": {"action_time": "2022-04-27T01:12:15.796Z", "user": 1, "content_type": 21, "object_id": "2", "object_repr": "nathanchapman@protonmail.com", "action_flag": 3, "change_message": ""}}, {"model": "admin.logentry", "pk": 11, "fields": {"action_time": "2022-04-27T01:12:28.427Z", "user": 1, "content_type": 15, "object_id": "4", "object_repr": "cnathan036@gmail.com", "action_flag": 3, "change_message": ""}}, {"model": "admin.logentry", "pk": 12, "fields": {"action_time": "2022-04-27T01:19:39.776Z", "user": 1, "content_type": 21, "object_id": "7", "object_repr": "", "action_flag": 3, "change_message": ""}}, {"model": "auth.permission", "pk": 1, "fields": {"name": "Can add log entry", "content_type": 1, "codename": "add_logentry"}}, {"model": "auth.permission", "pk": 2, "fields": {"name": "Can change log entry", "content_type": 1, "codename": "change_logentry"}}, {"model": "auth.permission", "pk": 3, "fields": {"name": "Can delete log entry", "content_type": 1, "codename": "delete_logentry"}}, {"model": "auth.permission", "pk": 4, "fields": {"name": "Can view log entry", "content_type": 1, "codename": "view_logentry"}}, {"model": "auth.permission", "pk": 5, "fields": {"name": "Can add permission", "content_type": 2, "codename": "add_permission"}}, {"model": "auth.permission", "pk": 6, "fields": {"name": "Can change permission", "content_type": 2, "codename": "change_permission"}}, {"model": "auth.permission", "pk": 7, "fields": {"name": "Can delete permission", "content_type": 2, "codename": "delete_permission"}}, {"model": "auth.permission", "pk": 8, "fields": {"name": "Can view permission", "content_type": 2, "codename": "view_permission"}}, {"model": "auth.permission", "pk": 9, "fields": {"name": "Can add group", "content_type": 3, "codename": "add_group"}}, {"model": "auth.permission", "pk": 10, "fields": {"name": "Can change group", "content_type": 3, "codename": "change_group"}}, {"model": "auth.permission", "pk": 11, "fields": {"name": "Can delete group", "content_type": 3, "codename": "delete_group"}}, {"model": "auth.permission", "pk": 12, "fields": {"name": "Can view group", "content_type": 3, "codename": "view_group"}}, {"model": "auth.permission", "pk": 13, "fields": {"name": "Can add content type", "content_type": 4, "codename": "add_contenttype"}}, {"model": "auth.permission", "pk": 14, "fields": {"name": "Can change content type", "content_type": 4, "codename": "change_contenttype"}}, {"model": "auth.permission", "pk": 15, "fields": {"name": "Can delete content type", "content_type": 4, "codename": "delete_contenttype"}}, {"model": "auth.permission", "pk": 16, "fields": {"name": "Can view content type", "content_type": 4, "codename": "view_contenttype"}}, {"model": "auth.permission", "pk": 17, "fields": {"name": "Can add session", "content_type": 5, "codename": "add_session"}}, {"model": "auth.permission", "pk": 18, "fields": {"name": "Can change session", "content_type": 5, "codename": "change_session"}}, {"model": "auth.permission", "pk": 19, "fields": {"name": "Can delete session", "content_type": 5, "codename": "delete_session"}}, {"model": "auth.permission", "pk": 20, "fields": {"name": "Can view session", "content_type": 5, "codename": "view_session"}}, {"model": "auth.permission", "pk": 21, "fields": {"name": "Can add solar event", "content_type": 6, "codename": "add_solarschedule"}}, {"model": "auth.permission", "pk": 22, "fields": {"name": "Can change solar event", "content_type": 6, "codename": "change_solarschedule"}}, {"model": "auth.permission", "pk": 23, "fields": {"name": "Can delete solar event", "content_type": 6, "codename": "delete_solarschedule"}}, {"model": "auth.permission", "pk": 24, "fields": {"name": "Can view solar event", "content_type": 6, "codename": "view_solarschedule"}}, {"model": "auth.permission", "pk": 25, "fields": {"name": "Can add interval", "content_type": 7, "codename": "add_intervalschedule"}}, {"model": "auth.permission", "pk": 26, "fields": {"name": "Can change interval", "content_type": 7, "codename": "change_intervalschedule"}}, {"model": "auth.permission", "pk": 27, "fields": {"name": "Can delete interval", "content_type": 7, "codename": "delete_intervalschedule"}}, {"model": "auth.permission", "pk": 28, "fields": {"name": "Can view interval", "content_type": 7, "codename": "view_intervalschedule"}}, {"model": "auth.permission", "pk": 29, "fields": {"name": "Can add clocked", "content_type": 8, "codename": "add_clockedschedule"}}, {"model": "auth.permission", "pk": 30, "fields": {"name": "Can change clocked", "content_type": 8, "codename": "change_clockedschedule"}}, {"model": "auth.permission", "pk": 31, "fields": {"name": "Can delete clocked", "content_type": 8, "codename": "delete_clockedschedule"}}, {"model": "auth.permission", "pk": 32, "fields": {"name": "Can view clocked", "content_type": 8, "codename": "view_clockedschedule"}}, {"model": "auth.permission", "pk": 33, "fields": {"name": "Can add crontab", "content_type": 9, "codename": "add_crontabschedule"}}, {"model": "auth.permission", "pk": 34, "fields": {"name": "Can change crontab", "content_type": 9, "codename": "change_crontabschedule"}}, {"model": "auth.permission", "pk": 35, "fields": {"name": "Can delete crontab", "content_type": 9, "codename": "delete_crontabschedule"}}, {"model": "auth.permission", "pk": 36, "fields": {"name": "Can view crontab", "content_type": 9, "codename": "view_crontabschedule"}}, {"model": "auth.permission", "pk": 37, "fields": {"name": "Can add periodic tasks", "content_type": 10, "codename": "add_periodictasks"}}, {"model": "auth.permission", "pk": 38, "fields": {"name": "Can change periodic tasks", "content_type": 10, "codename": "change_periodictasks"}}, {"model": "auth.permission", "pk": 39, "fields": {"name": "Can delete periodic tasks", "content_type": 10, "codename": "delete_periodictasks"}}, {"model": "auth.permission", "pk": 40, "fields": {"name": "Can view periodic tasks", "content_type": 10, "codename": "view_periodictasks"}}, {"model": "auth.permission", "pk": 41, "fields": {"name": "Can add periodic task", "content_type": 11, "codename": "add_periodictask"}}, {"model": "auth.permission", "pk": 42, "fields": {"name": "Can change periodic task", "content_type": 11, "codename": "change_periodictask"}}, {"model": "auth.permission", "pk": 43, "fields": {"name": "Can delete periodic task", "content_type": 11, "codename": "delete_periodictask"}}, {"model": "auth.permission", "pk": 44, "fields": {"name": "Can view periodic task", "content_type": 11, "codename": "view_periodictask"}}, {"model": "auth.permission", "pk": 45, "fields": {"name": "Can add task result", "content_type": 12, "codename": "add_taskresult"}}, {"model": "auth.permission", "pk": 46, "fields": {"name": "Can change task result", "content_type": 12, "codename": "change_taskresult"}}, {"model": "auth.permission", "pk": 47, "fields": {"name": "Can delete task result", "content_type": 12, "codename": "delete_taskresult"}}, {"model": "auth.permission", "pk": 48, "fields": {"name": "Can view task result", "content_type": 12, "codename": "view_taskresult"}}, {"model": "auth.permission", "pk": 49, "fields": {"name": "Can add chord counter", "content_type": 13, "codename": "add_chordcounter"}}, {"model": "auth.permission", "pk": 50, "fields": {"name": "Can change chord counter", "content_type": 13, "codename": "change_chordcounter"}}, {"model": "auth.permission", "pk": 51, "fields": {"name": "Can delete chord counter", "content_type": 13, "codename": "delete_chordcounter"}}, {"model": "auth.permission", "pk": 52, "fields": {"name": "Can view chord counter", "content_type": 13, "codename": "view_chordcounter"}}, {"model": "auth.permission", "pk": 53, "fields": {"name": "Can add group result", "content_type": 14, "codename": "add_groupresult"}}, {"model": "auth.permission", "pk": 54, "fields": {"name": "Can change group result", "content_type": 14, "codename": "change_groupresult"}}, {"model": "auth.permission", "pk": 55, "fields": {"name": "Can delete group result", "content_type": 14, "codename": "delete_groupresult"}}, {"model": "auth.permission", "pk": 56, "fields": {"name": "Can view group result", "content_type": 14, "codename": "view_groupresult"}}, {"model": "auth.permission", "pk": 57, "fields": {"name": "Can add email address", "content_type": 15, "codename": "add_emailaddress"}}, {"model": "auth.permission", "pk": 58, "fields": {"name": "Can change email address", "content_type": 15, "codename": "change_emailaddress"}}, {"model": "auth.permission", "pk": 59, "fields": {"name": "Can delete email address", "content_type": 15, "codename": "delete_emailaddress"}}, {"model": "auth.permission", "pk": 60, "fields": {"name": "Can view email address", "content_type": 15, "codename": "view_emailaddress"}}, {"model": "auth.permission", "pk": 61, "fields": {"name": "Can add email confirmation", "content_type": 16, "codename": "add_emailconfirmation"}}, {"model": "auth.permission", "pk": 62, "fields": {"name": "Can change email confirmation", "content_type": 16, "codename": "change_emailconfirmation"}}, {"model": "auth.permission", "pk": 63, "fields": {"name": "Can delete email confirmation", "content_type": 16, "codename": "delete_emailconfirmation"}}, {"model": "auth.permission", "pk": 64, "fields": {"name": "Can view email confirmation", "content_type": 16, "codename": "view_emailconfirmation"}}, {"model": "auth.permission", "pk": 65, "fields": {"name": "Can add social application", "content_type": 17, "codename": "add_socialapp"}}, {"model": "auth.permission", "pk": 66, "fields": {"name": "Can change social application", "content_type": 17, "codename": "change_socialapp"}}, {"model": "auth.permission", "pk": 67, "fields": {"name": "Can delete social application", "content_type": 17, "codename": "delete_socialapp"}}, {"model": "auth.permission", "pk": 68, "fields": {"name": "Can view social application", "content_type": 17, "codename": "view_socialapp"}}, {"model": "auth.permission", "pk": 69, "fields": {"name": "Can add social account", "content_type": 18, "codename": "add_socialaccount"}}, {"model": "auth.permission", "pk": 70, "fields": {"name": "Can change social account", "content_type": 18, "codename": "change_socialaccount"}}, {"model": "auth.permission", "pk": 71, "fields": {"name": "Can delete social account", "content_type": 18, "codename": "delete_socialaccount"}}, {"model": "auth.permission", "pk": 72, "fields": {"name": "Can view social account", "content_type": 18, "codename": "view_socialaccount"}}, {"model": "auth.permission", "pk": 73, "fields": {"name": "Can add social application token", "content_type": 19, "codename": "add_socialtoken"}}, {"model": "auth.permission", "pk": 74, "fields": {"name": "Can change social application token", "content_type": 19, "codename": "change_socialtoken"}}, {"model": "auth.permission", "pk": 75, "fields": {"name": "Can delete social application token", "content_type": 19, "codename": "delete_socialtoken"}}, {"model": "auth.permission", "pk": 76, "fields": {"name": "Can view social application token", "content_type": 19, "codename": "view_socialtoken"}}, {"model": "auth.permission", "pk": 77, "fields": {"name": "Can add address", "content_type": 20, "codename": "add_address"}}, {"model": "auth.permission", "pk": 78, "fields": {"name": "Can change address", "content_type": 20, "codename": "change_address"}}, {"model": "auth.permission", "pk": 79, "fields": {"name": "Can delete address", "content_type": 20, "codename": "delete_address"}}, {"model": "auth.permission", "pk": 80, "fields": {"name": "Can view address", "content_type": 20, "codename": "view_address"}}, {"model": "auth.permission", "pk": 81, "fields": {"name": "Can add user", "content_type": 21, "codename": "add_user"}}, {"model": "auth.permission", "pk": 82, "fields": {"name": "Can change user", "content_type": 21, "codename": "change_user"}}, {"model": "auth.permission", "pk": 83, "fields": {"name": "Can delete user", "content_type": 21, "codename": "delete_user"}}, {"model": "auth.permission", "pk": 84, "fields": {"name": "Can view user", "content_type": 21, "codename": "view_user"}}, {"model": "auth.permission", "pk": 85, "fields": {"name": "Can add product", "content_type": 22, "codename": "add_product"}}, {"model": "auth.permission", "pk": 86, "fields": {"name": "Can change product", "content_type": 22, "codename": "change_product"}}, {"model": "auth.permission", "pk": 87, "fields": {"name": "Can delete product", "content_type": 22, "codename": "delete_product"}}, {"model": "auth.permission", "pk": 88, "fields": {"name": "Can view product", "content_type": 22, "codename": "view_product"}}, {"model": "auth.permission", "pk": 89, "fields": {"name": "Can add product photo", "content_type": 23, "codename": "add_productphoto"}}, {"model": "auth.permission", "pk": 90, "fields": {"name": "Can change product photo", "content_type": 23, "codename": "change_productphoto"}}, {"model": "auth.permission", "pk": 91, "fields": {"name": "Can delete product photo", "content_type": 23, "codename": "delete_productphoto"}}, {"model": "auth.permission", "pk": 92, "fields": {"name": "Can view product photo", "content_type": 23, "codename": "view_productphoto"}}, {"model": "auth.permission", "pk": 93, "fields": {"name": "Can add coupon", "content_type": 24, "codename": "add_coupon"}}, {"model": "auth.permission", "pk": 94, "fields": {"name": "Can change coupon", "content_type": 24, "codename": "change_coupon"}}, {"model": "auth.permission", "pk": 95, "fields": {"name": "Can delete coupon", "content_type": 24, "codename": "delete_coupon"}}, {"model": "auth.permission", "pk": 96, "fields": {"name": "Can view coupon", "content_type": 24, "codename": "view_coupon"}}, {"model": "auth.permission", "pk": 97, "fields": {"name": "Can add shipping method", "content_type": 25, "codename": "add_shippingmethod"}}, {"model": "auth.permission", "pk": 98, "fields": {"name": "Can change shipping method", "content_type": 25, "codename": "change_shippingmethod"}}, {"model": "auth.permission", "pk": 99, "fields": {"name": "Can delete shipping method", "content_type": 25, "codename": "delete_shippingmethod"}}, {"model": "auth.permission", "pk": 100, "fields": {"name": "Can view shipping method", "content_type": 25, "codename": "view_shippingmethod"}}, {"model": "auth.permission", "pk": 101, "fields": {"name": "Can add order", "content_type": 26, "codename": "add_order"}}, {"model": "auth.permission", "pk": 102, "fields": {"name": "Can change order", "content_type": 26, "codename": "change_order"}}, {"model": "auth.permission", "pk": 103, "fields": {"name": "Can delete order", "content_type": 26, "codename": "delete_order"}}, {"model": "auth.permission", "pk": 104, "fields": {"name": "Can view order", "content_type": 26, "codename": "view_order"}}, {"model": "auth.permission", "pk": 105, "fields": {"name": "Can add transaction", "content_type": 27, "codename": "add_transaction"}}, {"model": "auth.permission", "pk": 106, "fields": {"name": "Can change transaction", "content_type": 27, "codename": "change_transaction"}}, {"model": "auth.permission", "pk": 107, "fields": {"name": "Can delete transaction", "content_type": 27, "codename": "delete_transaction"}}, {"model": "auth.permission", "pk": 108, "fields": {"name": "Can view transaction", "content_type": 27, "codename": "view_transaction"}}, {"model": "auth.permission", "pk": 109, "fields": {"name": "Can add order line", "content_type": 28, "codename": "add_orderline"}}, {"model": "auth.permission", "pk": 110, "fields": {"name": "Can change order line", "content_type": 28, "codename": "change_orderline"}}, {"model": "auth.permission", "pk": 111, "fields": {"name": "Can delete order line", "content_type": 28, "codename": "delete_orderline"}}, {"model": "auth.permission", "pk": 112, "fields": {"name": "Can view order line", "content_type": 28, "codename": "view_orderline"}}, {"model": "auth.permission", "pk": 113, "fields": {"name": "Can add site", "content_type": 29, "codename": "add_site"}}, {"model": "auth.permission", "pk": 114, "fields": {"name": "Can change site", "content_type": 29, "codename": "change_site"}}, {"model": "auth.permission", "pk": 115, "fields": {"name": "Can delete site", "content_type": 29, "codename": "delete_site"}}, {"model": "auth.permission", "pk": 116, "fields": {"name": "Can view site", "content_type": 29, "codename": "view_site"}}, {"model": "auth.permission", "pk": 117, "fields": {"name": "Can add Tracking Number", "content_type": 30, "codename": "add_trackingnumber"}}, {"model": "auth.permission", "pk": 118, "fields": {"name": "Can change Tracking Number", "content_type": 30, "codename": "change_trackingnumber"}}, {"model": "auth.permission", "pk": 119, "fields": {"name": "Can delete Tracking Number", "content_type": 30, "codename": "delete_trackingnumber"}}, {"model": "auth.permission", "pk": 120, "fields": {"name": "Can view Tracking Number", "content_type": 30, "codename": "view_trackingnumber"}}, {"model": "contenttypes.contenttype", "pk": 1, "fields": {"app_label": "admin", "model": "logentry"}}, {"model": "contenttypes.contenttype", "pk": 2, "fields": {"app_label": "auth", "model": "permission"}}, {"model": "contenttypes.contenttype", "pk": 3, "fields": {"app_label": "auth", "model": "group"}}, {"model": "contenttypes.contenttype", "pk": 4, "fields": {"app_label": "contenttypes", "model": "contenttype"}}, {"model": "contenttypes.contenttype", "pk": 5, "fields": {"app_label": "sessions", "model": "session"}}, {"model": "contenttypes.contenttype", "pk": 6, "fields": {"app_label": "django_celery_beat", "model": "solarschedule"}}, {"model": "contenttypes.contenttype", "pk": 7, "fields": {"app_label": "django_celery_beat", "model": "intervalschedule"}}, {"model": "contenttypes.contenttype", "pk": 8, "fields": {"app_label": "django_celery_beat", "model": "clockedschedule"}}, {"model": "contenttypes.contenttype", "pk": 9, "fields": {"app_label": "django_celery_beat", "model": "crontabschedule"}}, {"model": "contenttypes.contenttype", "pk": 10, "fields": {"app_label": "django_celery_beat", "model": "periodictasks"}}, {"model": "contenttypes.contenttype", "pk": 11, "fields": {"app_label": "django_celery_beat", "model": "periodictask"}}, {"model": "contenttypes.contenttype", "pk": 12, "fields": {"app_label": "django_celery_results", "model": "taskresult"}}, {"model": "contenttypes.contenttype", "pk": 13, "fields": {"app_label": "django_celery_results", "model": "chordcounter"}}, {"model": "contenttypes.contenttype", "pk": 14, "fields": {"app_label": "django_celery_results", "model": "groupresult"}}, {"model": "contenttypes.contenttype", "pk": 15, "fields": {"app_label": "account", "model": "emailaddress"}}, {"model": "contenttypes.contenttype", "pk": 16, "fields": {"app_label": "account", "model": "emailconfirmation"}}, {"model": "contenttypes.contenttype", "pk": 17, "fields": {"app_label": "socialaccount", "model": "socialapp"}}, {"model": "contenttypes.contenttype", "pk": 18, "fields": {"app_label": "socialaccount", "model": "socialaccount"}}, {"model": "contenttypes.contenttype", "pk": 19, "fields": {"app_label": "socialaccount", "model": "socialtoken"}}, {"model": "contenttypes.contenttype", "pk": 20, "fields": {"app_label": "accounts", "model": "address"}}, {"model": "contenttypes.contenttype", "pk": 21, "fields": {"app_label": "accounts", "model": "user"}}, {"model": "contenttypes.contenttype", "pk": 22, "fields": {"app_label": "core", "model": "product"}}, {"model": "contenttypes.contenttype", "pk": 23, "fields": {"app_label": "core", "model": "productphoto"}}, {"model": "contenttypes.contenttype", "pk": 24, "fields": {"app_label": "core", "model": "coupon"}}, {"model": "contenttypes.contenttype", "pk": 25, "fields": {"app_label": "core", "model": "shippingmethod"}}, {"model": "contenttypes.contenttype", "pk": 26, "fields": {"app_label": "core", "model": "order"}}, {"model": "contenttypes.contenttype", "pk": 27, "fields": {"app_label": "core", "model": "transaction"}}, {"model": "contenttypes.contenttype", "pk": 28, "fields": {"app_label": "core", "model": "orderline"}}, {"model": "contenttypes.contenttype", "pk": 29, "fields": {"app_label": "sites", "model": "site"}}, {"model": "contenttypes.contenttype", "pk": 30, "fields": {"app_label": "core", "model": "trackingnumber"}}, {"model": "sessions.session", "pk": "6j6ykvianw93ehhq4g7dttty3jlna4bu", "fields": {"session_data": ".eJxlkLtOwzAYhVNEuaoCVTxAR6YozsVtt3IZECCmMlt_bKexSOwodiQ6IPEAHs2T8II4gSIkvP3fOf85tt_HH5-jYDhv7tKe61I0jZAbAoy1XGvX05NCtNoQCTV39uAJTAnS2eMKfuHhTQlN3dMxr0FUzl5QOfiiBK82PQqpqp0vMC3nZhdPkLMTlM2XszVUSs5u2_-W2NnA2X0qzNbHP6rNUKMNGF-897x29rRRfqwIVcyj8SJNYuQ6e6RaxlsimHu48_vQGv8aOyHQmZJ0-luyI3-F6R-WA33h0gsJVFWPQ6BUddKEg-dH1uGVn7g0goIRSl7vts7-RJWgS2dXNE2XyRLiLMeAEeAUx4ssTQsec8hzGqECF5ilMcx5xBClCGMeoQwznPA5yqAP1f4nfA3hr41ot-4-6KZBF34B1PSjww:1nijSZ:p8Sf77uIyGIIYgGFLBfolAswMPxruDiNy8nVz-jtME0", "expire_date": "2022-05-08T21:07:59.098Z"}}, {"model": "sessions.session", "pk": "92negsb5ztorw4mepj4yl5yvt1aivlpp", "fields": {"session_data": ".eJxNjE0KwjAQRhV0KYKn0E1o0mRqd-LeM5RJMjVVaaE_y4IHyHK8i8dTUaHf8r3Hd18-nrPvRt7GhcO255HjqsChD8XQUVtUnuNcctxMmEV3pfotdv6C9bkRrqn7trLik4if7cSp8XQ7_tv15CBgFzgenNZ5mqMyFhAkgga1N1qXpAitdYksoQSvFWaUeOmcBKBEGvCQUiYN8iBeu9VDDw:1njshD:so5S5EDsN5szM2CXXy2rixbOUPCmYTpU5J8RaRL-fFM", "expire_date": "2022-05-12T01:11:51.837Z"}}, {"model": "sessions.session", "pk": "ane5jf8oe9fujxyoh7waeby9jumlwwwf", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nXn7s:6C2XAnFOGVBsWvUrKiX2OesIwjuxdGHY0uihEqo3XcE", "expire_date": "2022-04-08T16:49:24.607Z"}}, {"model": "sessions.session", "pk": "azi2l9xv19ysirt0fv9krt7gqzt7uhrm", "fields": {"session_data": ".eJxlUU1PxCAU_CsN56aBlrIfJ3X1ZvakZ_JK6YK2UOE10Wz2vwt1jdl4IXkzw8z7OBMFAcn-THh-PhZwaPGL7FlJgoeYKHLwThePwc6kJHOwSieMNRWn5HIpiYQFjVyiDtL2mSE3WAfqXbtMwDhmuAKl_OKwWjVXOlb3qdIpWwFa7x6uv26sDESTfBTnu2YHddsJEAwEF_W25XzQtYauU5QNYhA9r2Gjac-UYkJoylrRi0ZvWAvZNOoYU4zUn7MNedqa7gSlJYnGzrN1Jwl9H5IoL2WwIaJ0MOXBj4AGXPIY4Q88GJinFdUT2DE36R2Cwju3yt_Uj6BSfkqiiEFr_I2QLG-tpbw4FnVDi6f_ijopEqrWy5CjD2iKZ39aEyMC5h5eX_J5fCpHqXyfoS1vOEtH-gasIJ48:1nXnAR:9rzc3PPjB27HSeXj-3R36rT_Yh278WLa779jUhPoI7Q", "expire_date": "2022-04-08T16:52:03.901Z"}}, {"model": "sessions.session", "pk": "b2k67a57itcqv1c3csqnoej4h6kfq9l9", "fields": {"session_data": ".eJxVj8GKwzAMRH-l6ByC7TjqprftT_QYFEUhpsHJ2g60lPx77aWXXgSaJ80wL2AKCS4vsGX87eSTS0-46ArCSjEjuM3rIqerkI9QwRYcS1Z1U1sFx1FBT3ua-z1K6N1YCHxpA_FdfAG0LEWuiXndfar_bz441r95k5zOlNzqr5-vL6uZ4px92Nqu6ci0AxJqQovmp7V2EiM0DKz0hBOO1tBZ1KiZNaIo3eKIjZx1S8U0Sow5ppfH5kLpa1SHSh1vahhY3Q:1nXmG8:NbkZMFczHT4bDXOZjTadrlgcN-j0AJB-GCBabR1S8CA", "expire_date": "2022-04-08T15:53:52.200Z"}}, {"model": "sessions.session", "pk": "bzgy4nz5b066208wbkb5mqz1s63i4sn7", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nc9YH:PrNqdPqV3UVN0_A2P3xKYvECyYeztkDSMXxRqX54s6A", "expire_date": "2022-04-20T17:34:41.100Z"}}, {"model": "sessions.session", "pk": "cm7n2rik6pl0siklk66e0lwfnxjw2cih", "fields": {"session_data": ".eJyNUctqwzAQ_JWgczCWLCuPU5OU0kLIKaG9mbUsx2ptyZVkaAn5965clxJ66UVoR7M7O6ML8Y3ue23OBVSVU96T9YXU2vlQGOgUWZMDhAYMmZMWfsFdA303oqoD3SIirQkgw50Z6a_ym5BI2yHJB6dU-JEoKPJpvljNjtBaM7t3fykMKYhKHT7xtrfnUcwHCFH-dMSit1i2hbRVhJY8Y5Rc56SAITTF4JUrdBWFyA1WgnxTJj5A20Y4ASntYEIycqZnn2ywUiZoCUFbs526bkY14JvonPNVtgKWlwIEBcEFW-ac14opKEuZ0lrUouIMFiqtqJRUCJXSXFQiUwuaQxzq0TPKFOqj1w4dU5auRJrOiXXVZIRjJcGF-EE8Hu8D4H4xHzonZ6dHU8-NbdVsq8D4GJHTMoZDs4SnMRx228j-2YidmFGPC05p7zenw-7x4emFXL8AKLC7vg:1ncfwj:SKGf9v4-WJAnq789EOHg6fYHfFbPgBhaeSrgfdilPlM", "expire_date": "2022-04-22T04:10:05.126Z"}}, {"model": "sessions.session", "pk": "crmtli1jhrkvdf4s3q4xh6h54zn65snf", "fields": {"session_data": ".eJxVjcsKgzAQRf8l6yLmMWnirv2RMBlHDBUtJkKL-O_V4sblfZ27CsK5iGbdbiLgUvqwZJ5DakUjjLh4EenF4xHgMBx2hUTTMpbq3znjXD12xWNJhCVN4_NcXVA95n7ntN44CVZpp1z0HSiw0mgLxkE0WmtFkaCLxEprtnC3LRvo0KD1IL33BzRzzvtN4M87zV_RSFV7W9fbD7lWRtM:1nbtUs:Jtlc-KT-VGsRjR7u01zYjuuZGiZslIjtaHbtwUUNleA", "expire_date": "2022-04-20T00:26:06.477Z"}}, {"model": "sessions.session", "pk": "cuydyrkxn8cmth8kc4k5vrx63bxtdgk6", "fields": {"session_data": ".eJxljcsKwjAQRX-lzLoIqRW1K0GX4qquw5DEJpAXSTal9N-dRsSFu7nnHuYukLWJ0fiJo5RJ5QzDAi-TcuEenYIBHlg0emjB4g9eNUZXqXJoLBFfNfHhF63mnQiO-lySUuX7nTNS2eF4bka0wTe39K90pBAVpsx03cNUd3LBsi0_RwoxULRcBLmhU7_vGKwthCRV4kbC0LP1DWQCSJI:1nc9x4:UmJqQaUquQ3z2MAspOdwHswoSTEcJy8L_77dYmuxDB0", "expire_date": "2022-04-20T18:00:18.100Z"}}, {"model": "sessions.session", "pk": "d3mifx8qquxm6vm1u0q919fbvn0zrsno", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nc7Ce:IISm3ymI51cGd1w47MpgvWjPZruMfOBLdWdXmiHe2mc", "expire_date": "2022-04-20T15:04:12.472Z"}}, {"model": "sessions.session", "pk": "djdss235tjrlry3gzefnsjbn1gjfprpo", "fields": {"session_data": ".eJxlUctqwzAQ_BWjczCSLCuPU5NQ6CHk1NCjWctyrNaWXEmGhpB_78pNaUsvgp2dnZnVXkkFU-yqKWhfmYZsCCOL31gN6k3b1IC-T3AOSrnJxnzm3Nsh32KlbTQKonF2d5_6I9VB6FBHCbEu1sDLWoJkIIXkq1KIVnMNda0oa2UrG8FhqWnDlGJSaspK2chCL1kJSTToENCm0h-j8ReyYZyuJaULgtFGxJVrNFodtqfj_olzHAmdGUdjzxU0jcdpsrmS1vgQKwtD4h4hdmCR2cMPuO9gHGZUD2D6lN7ZCCo-2Jn-qr4IuXJDMole6_htUbH0nSUV2THjBc0e_zM4MhBVJl5SBOdjlx3ceXYMEWLKcHrGYnRY9t97rUQhGLktiPPN_W5FiTLgY9pLpOd9AjxH0mUL4h0uhYMvnet1ttNgQxL1RiU5VuSCktvt9glOIasF:1nXAlU:n6uPOSaeX41fYGeN_yLhot6iodUrz7Md6Ze8HSj0s84", "expire_date": "2022-04-06T23:51:44.369Z"}}, {"model": "sessions.session", "pk": "f79506bo7ug1b57hun3m50d644j72bpd", "fields": {"session_data": ".eJxlj0sLwjAQhP9K2XMp9iFqT76OxZPgMSxpbAJpEpP1UIr_3aQiHrws7LezM8wMHD1BO0OTxuOJhhRN0FY5DF6ZHlq4SatFdhRoAuTgvOIi0rIumhW8XjkEqZxTZmDY916EkIzuygdiBsckvSBJNPFX4w-eJLpxoWJEpSMxi4x_-F6KqeB2jPdAXgj6urMyha83u-yK2prs7P8lVZREypcm0NlhyQmElJIPXaph46oZt31C26auyljmDWwHWEU:1ncA9s:t5WR3F9XRR7YkrKObVcHlktODPbu_Kbd94IIwmL4k7s", "expire_date": "2022-04-20T18:13:32.380Z"}}, {"model": "sessions.session", "pk": "g0wtc5yt5nwx4jjttg0c808zx1i4d8h7", "fields": {"session_data": "eyJjYXJ0Ijp7IjMiOnsicXVhbnRpdHkiOjEsImdyaW5kIjoiV2hvbGUgQmVhbnMiLCJwcmljZSI6IjEzLjQwIn19fQ:1nc7DF:mbGt2m0SdsMLppgpUN72dH2ogTeylJ2QHbjBr8ZyMdU", "expire_date": "2022-04-20T15:04:49.680Z"}}, {"model": "sessions.session", "pk": "gca64nmai77f3pp1khdkjv5u11nc4v9h", "fields": {"session_data": ".eJxNjE0KwjAQhRV0pwguPIOr0hjapDv1AF6hTCYTGqwV2tRdwQNkOR7TO_gPvt373s91eruPPhp4HScIbeCB4woQz30Tygu13nmyJZ3A13yIs1_Sd9RyHCuO8xL6UL1B6S1X07j8IwbwSI3lKKGuXzj5PiTvzjfukt3TURM8QvDnZv9bLf6uKugqjtvcojBWADqZKVGgBAWUO6U3pAELBzYltQGntRBWklboTOEITZopJU3OffIARgxaYA:1njrNl:B6J7_7d3cyIclWsSEnGWob8IXJYNEs2cPSMHV0IadTI", "expire_date": "2022-05-11T23:47:41.576Z"}}, {"model": "sessions.session", "pk": "hhma9hwdjb6e7v4b0z23vqnks4bv0bzc", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nc6sI:B41jF-V1BZXUvPBjBlO819_cJ9ZIae5KxtcZIiJTLec", "expire_date": "2022-04-20T14:43:10.522Z"}}, {"model": "sessions.session", "pk": "ju3p0afnj1coxo7v6mpfe9f6vz5ogwzr", "fields": {"session_data": ".eJydkTFPwzAQhf9K5TmK4sRxm05QGBFTEaN1uVwaQ2IH25FAFf8dOxShio3F0j1_957Pd2YILrD9mVXpeFvABB0-2J5n7OS06diePQ92pM2BwHiWsdlppKjyKhcF-8yY-F9j7FSwhEEtnpzSiefsSmsBX2k1gnFMcg6IdjEhX5nLtc9vY0UxHSFoaw6XriurAfwQfVCIpmqgrFsJkoMUstzVQvRUErQtFryXvexECVsqOo7IpaSC17KTFW15DcnUk_cxRtH7rF2atywaWRQZ84OeZ21OCrrORSh9S6-dD8rAlAZ_hDCAiR4j_Ip3A8zTqtIEekyPtCYAhhuz4i_4DeRopwj54IjCT4Ti6dfqbbM5wmjN5t79RcqIRBXX5bAHe1rDfICQ4p-OaTM2lqNC2yVpJ6qSx_18AW4kr0o:1nc9m3:n66QgIysqKXAb_hSwjeHtOkK8YVGCdXFNy6MnIb5I_4", "expire_date": "2022-04-20T17:48:55.819Z"}}, {"model": "sessions.session", "pk": "k397vc086vmvxx75qvedgl3kfd4qo1tx", "fields": {"session_data": "gAWVDQAAAAAAAAB9lIwEY2FydJR9lHMu:1njsRk:zi0cRbbFPR--er31UQWMSPDqLBr9ww6Pjyrlc_6Opqk", "expire_date": "2022-05-12T00:55:52.038Z"}}, {"model": "sessions.session", "pk": "m8hwkh4tbejjy7e8v95v9deefchfvhyi", "fields": {"session_data": "gAWVDQAAAAAAAAB9lIwEY2FydJR9lHMu:1nijbo:peQo1m1ZtgtlYj75a_GXVJZCTYKMRPToW9FfF5o6YCc", "expire_date": "2022-05-08T21:17:32.830Z"}}, {"model": "sessions.session", "pk": "ma2m5te2o9y6pjel6cu13qv0sw81225r", "fields": {"session_data": ".eJxlj8sKwjAQRX-lzLpIYytIV4K4k650HYYkNoHmQTKbUvrvTiviwuU9c7iXWaBYl5ILo0StsykF-gVeLheSAb2BHgYkiwFqmPAHrxaT36nx6CYmYdfUh1-smQ8qer4XysbQt10KVsWp6aqhOrZNdfs3jmwwVY7mbT1mstU9jvtYIaRt_vngkCLHSaqoN3Tu2k7AWkPM2mTpNPSt4BrMxC-t6xtf2EyS:1nX7GN:w7Ch9ArViJcpOxE-JTDyybVGPbfhL9lHnnFW2Jjcpew", "expire_date": "2022-04-06T20:07:23.400Z"}}, {"model": "sessions.session", "pk": "nc5e41dgatbaeuzqdpi6e19g9p1bbggc", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nbmok:h_gqs7WDcZ8EsO810UdTR1cbjio3TTKwktYN2bTUWZ4", "expire_date": "2022-04-19T17:18:10.938Z"}}, {"model": "sessions.session", "pk": "pezve7uulexuistrgyu1k7k1z1lxzqpc", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1ncAQA:M3yc18GxlEW4EJ7JTgp40JcR_ToGN9b5u27o3m-O9GM", "expire_date": "2022-04-20T18:30:22.332Z"}}, {"model": "sessions.session", "pk": "q2feyjejwu9ujq338nncfgo0fkowxde6", "fields": {"session_data": ".eJxlkctuwyAQRX_FYh1ZgDF5rPpQd1VW7RqNYRxQbbCASK2i_HvBTVVFXd4zd-4Mw4Uk65bF-ZMCYyKmRA4XMrqYsvIwIzmQI2QLnmzIBH_w2cIyrxRncFMhfrXpH_6wxJCDr6VWh7nYUo6I-XeIYqWD9VQ0x4Z3tHn57-DFUah2-asuEWK2zWs4rTNThly3eH8rYglFTkoHU9FOdIKR64aEaDAqZ8ihoxui4JytOqcbIozcsQH0B_pagGmquAWtw9nndvXcyql9LAp9dhqyC_7p1nUXZSHZkqOF2Hd74P0gQTKQQvJdL8SIHGEYNGWjHKURHLZIDdOaSYmU9dLIDreshxqayh3KGIWfi4vlCozTvaTlNRpiLv90vX4Dp5iTZg:1nVPCq:JgjmKOmKEIlpipy9XQCLeJX1uB7ruzz7TSToYHu-eJ8", "expire_date": "2022-04-02T02:52:40.418Z"}}, {"model": "sessions.session", "pk": "rdhtj7u2d7j2s6lygin8i8ub1zi0cc9k", "fields": {"session_data": ".eJxlkMtuwyAQRX8lYh1ZgDGJs-pzV3WVrtEYcExrgwtYahXl3zu4qaqqG4u5HM7V-EzS4ObZ-ZMCY6JNiRzOpHcxZeVhsuRAniEP4MmWjPAb3g8wT2tqJ3AjJjr4DDrf-BV_1d9ApcOEUMrR2vxToRjyrNm1myOMwW8e4n-EI4KpdvkTT0_htJalDLnUvxxxmAOOo9LBlGgvas7IZUtCNDYqZ8hBcBRAzGWlunzeF_B5NbItOUXnESKPaS6NoRij08XF6kpQckGZgiUPaklXI2HkT9aBfrOrBcaxxBVoHRafq5W5XqfqFieL1RqyC_7u-uqPaoA0lN8oRFu3wJtOgmQgheT7RojecgtdpynrZS-N4LCz1DCtmZSWskYaWdsda6BIE66DNcp-zC6WZTltJaWXLzh8oek:1ncA8d:g2xlbXjIXO3fAgvQ_QipUMwkMgCkbvkBozmV2N94XCI", "expire_date": "2022-04-20T18:12:15.418Z"}}, {"model": "sessions.session", "pk": "urt9gjg9fx6x4bdhs24qzpmgdilrpf5f", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nWmSS:gh_0Rw36EFg4AKmnDqwpjPqObEvooMy0FtbuVfq2f0o", "expire_date": "2022-04-05T21:54:28.540Z"}}, {"model": "sessions.session", "pk": "uztbma4l4z4048wzg474e4ih96ri47e8", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nc6vh:K2_8_JmFkBShNs1cjiPuny6XhTJynM2Awub_J7JFglg", "expire_date": "2022-04-20T14:46:41.734Z"}}, {"model": "sessions.session", "pk": "xn496byllzu8n8u1kgwotso9hxdhptqp", "fields": {"session_data": "eyJjYXJ0Ijp7fX0:1nbmtW:oWOtwdXZqNwOWg2YDAAbm1Na-fQCkc7-UKPmQTUkHIE", "expire_date": "2022-04-19T17:23:06.817Z"}}, {"model": "sessions.session", "pk": "ybokbwcgn6g5dyajpfub36yog6inbaek", "fields": {"session_data": "eyJjYXJ0Ijp7IjMiOnsicXVhbnRpdHkiOjIsImdyaW5kIjoiV2hvbGUgQmVhbnMiLCJwcmljZSI6IjEzLjQwIn19LCJjb3Vwb25fY29kZSI6IkxBVU5DSEZJWCJ9:1nc9Ys:_Ym5aNnqoyxKuv90UpUiBdCr6XO2QIABSyxlXT2KlWs", "expire_date": "2022-04-20T17:35:18.006Z"}}, {"model": "sessions.session", "pk": "z2xb3rbhcmehh7yj22r9p98oxgivcp92", "fields": {"session_data": ".eJxNjEkOgkAQRTWRncbEhWdwRbAZe6cewCuQ6qI6dERIoHFH4gF6WR7TOziS8Hf__eHuPZ6znwbeuQVCa3lgtwXEpq9tfqPWaENFTlcwFZ_dckz6jlp2c8lulUNvyy_ITcGl5zYTogAvVBfsQqiqD_b_D_638487__h2VFuDYE1Tn8bVenJVQleyO4hQUSBFkiqlKUjiOE6DfaTTlDCOMqEEKhlkAFokkcRMCiApVAFKRISgQ-79FwhdWWI:1njsh0:unJQGA9EJ90MQ0e_Yquxp_NGSwnJVzd38s8TcUQK7YA", "expire_date": "2022-05-12T01:11:38.819Z"}}, {"model": "sites.site", "pk": 1, "fields": {"domain": "localhost", "name": "PT Coffee"}}, {"model": "account.emailaddress", "pk": 3, "fields": {"user": 1, "email": "contact@nathanjchapman.com", "verified": true, "primary": true}}, {"model": "account.emailaddress", "pk": 9, "fields": {"user": 8, "email": "cyadoux@protonmail.com", "verified": false, "primary": true}}, {"model": "account.emailaddress", "pk": 10, "fields": {"user": 9, "email": "debug@nathanjchapman.com", "verified": false, "primary": true}}, {"model": "accounts.address", "pk": 1, "fields": {"first_name": "Nathan", "last_name": "Chapman", "street_address_1": "1579 Talon Dr", "street_address_2": "", "city": "Logan", "state": "UT", "postal_code": "84321"}}, {"model": "accounts.address", "pk": 2, "fields": {"first_name": "Nathan", "last_name": "Chapman", "street_address_1": "1504 N 230 E", "street_address_2": "", "city": "NORTH LOGAN", "state": "UT", "postal_code": "84341"}}, {"model": "accounts.user", "pk": 1, "fields": {"password": "pbkdf2_sha256$320000$ZGHDCMDFd6rYT6vQy9C3zc$QVSHi0oz2B8VOurGMf4Gbnh16ruB25fbmuOiRRIxRXM=", "last_login": "2022-04-28T00:56:20.437Z", "is_superuser": true, "username": "nathanchapman", "first_name": "Nathan", "last_name": "Chapman", "email": "contact@nathanjchapman.com", "is_staff": true, "is_active": true, "date_joined": "2022-03-15T16:20:34Z", "default_shipping_address": 1, "default_billing_address": null, "groups": [], "user_permissions": [], "addresses": [1]}}, {"model": "accounts.user", "pk": 8, "fields": {"password": "pbkdf2_sha256$320000$DAgegWoiYIyU7Ko3s7xJgB$GSX69vg31ZgfYMznVKjgZlBGAkdX+yLbcE3OY1OVNeY=", "last_login": null, "is_superuser": false, "username": "cyadoux@protonmail.com", "first_name": "Nathan", "last_name": "Chapman", "email": "cyadoux@protonmail.com", "is_staff": false, "is_active": true, "date_joined": "2022-04-28T00:56:08.839Z", "default_shipping_address": null, "default_billing_address": null, "groups": [], "user_permissions": [], "addresses": []}}, {"model": "accounts.user", "pk": 9, "fields": {"password": "pbkdf2_sha256$320000$JVhiZD8dntHrrHLRqoFVe6$W+CHrIZZEbRUuOhoKzGQBLIJ8e7FiokZUpLbb4gn1VI=", "last_login": "2022-04-28T01:11:38.211Z", "is_superuser": false, "username": "", "first_name": "Debug", "last_name": "Chapman", "email": "debug@nathanjchapman.com", "is_staff": false, "is_active": true, "date_joined": "2022-04-28T01:11:37.302Z", "default_shipping_address": null, "default_billing_address": null, "groups": [], "user_permissions": [], "addresses": []}}, {"model": "core.product", "pk": 1, "fields": {"name": "Ethiopia", "description": "Spicy espresso reminiscent of Northern Italy, on the mild side. Perfect for espresso, and steamed milk drinks. Also, a full-bodied, earthy sweet drip or Americano. Contains organic beans from Indonesia, Africa and America.", "sku": "23468", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 4, "created_at": "2022-02-19T20:15:36.292Z", "updated_at": "2022-03-28T17:29:26.300Z"}}, {"model": "core.product", "pk": 2, "fields": {"name": "Sumatra", "description": "Dark heavy-bodied roast with a lingering chocolatey taste. Organic Single origin.", "sku": "89765", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 3, "created_at": "2022-02-19T20:15:59.741Z", "updated_at": "2022-03-28T17:29:08.706Z"}}, {"model": "core.product", "pk": 3, "fields": {"name": "Pantomime", "description": "Very Dark French Roast\r\nOur darkest drip. A blend of five different beans roasted two ways. Organic Africa, Indonesia, and South and Central America.", "sku": "565656", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 1, "created_at": "2022-02-23T17:59:00.711Z", "updated_at": "2022-03-28T17:28:58.670Z"}}, {"model": "core.product", "pk": 4, "fields": {"name": "Decaf", "description": "French Roast (Water Processed)\r\n\r\n“I can’t believe it’s decaf!”. The best-tasting Swiss water process decaf we have developed over the past 30 years, for an unbelievable espresso or drip coffee. Organic Africa, Indonesia and South and Central America.", "sku": "566565", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 2, "created_at": "2022-02-23T17:59:32.099Z", "updated_at": "2022-03-28T17:28:45.512Z"}}, {"model": "core.product", "pk": 5, "fields": {"name": "Moka Java Blend", "description": "Dark Roast\r\n\r\nA classic Moka Java style blend dark roasted with organic beans for a perfect body and sweetness with a hint of citrus.", "sku": "56466", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": false, "sorting": 5, "created_at": "2022-02-23T18:05:41.742Z", "updated_at": "2022-03-28T17:29:39.761Z"}}, {"model": "core.product", "pk": 6, "fields": {"name": "Loop d’ Loop", "description": "Mild Dark Roast\r\n\r\nOur most popular blend reminiscent of Central Italy. A dark, chocolaty flavor perfect for espresso or drip. It’s dark Vienna roast properties make it ideal for steamed milk drinks. Organic Indonesia, Africa and America.", "sku": "53264", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 6, "created_at": "2022-02-23T18:06:09.881Z", "updated_at": "2022-03-28T17:29:53.104Z"}}, {"model": "core.product", "pk": 7, "fields": {"name": "Dante’s Tornado", "description": "Medium Roast\r\n\r\nFull City spicy espresso roast reminiscent of Northern Italy, on the mild side. A full- bodied, earthy sweet drip or Americano. Organic Indonesia, Africa and America.", "sku": "78945", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 7, "created_at": "2022-02-23T18:06:35.593Z", "updated_at": "2022-03-28T17:30:11.445Z"}}, {"model": "core.product", "pk": 8, "fields": {"name": "Nicaragua", "description": "Mild Roast\r\n\r\nOur mildest roast with sweet and fruity notes, containing organic beans from Nicaragua. Single origin.", "sku": "12365", "price": "13.40", "weight": "16.0:oz", "visible_in_listings": true, "sorting": 8, "created_at": "2022-02-23T18:06:57.624Z", "updated_at": "2022-03-28T17:30:20.941Z"}}, {"model": "core.productphoto", "pk": 1, "fields": {"product": 1, "image": "products/images/slice2.png"}}, {"model": "core.productphoto", "pk": 2, "fields": {"product": 2, "image": "products/images/slice1.png"}}, {"model": "core.productphoto", "pk": 5, "fields": {"product": 5, "image": "products/images/moka_java.png"}}, {"model": "core.productphoto", "pk": 6, "fields": {"product": 6, "image": "products/images/loop_d_loop.png"}}, {"model": "core.productphoto", "pk": 7, "fields": {"product": 7, "image": "products/images/dantes_tornado.png"}}, {"model": "core.productphoto", "pk": 8, "fields": {"product": 8, "image": "products/images/nicaragua.png"}}, {"model": "core.productphoto", "pk": 15, "fields": {"product": 3, "image": "products/images/pantomime_800.png"}}, {"model": "core.productphoto", "pk": 16, "fields": {"product": 3, "image": "products/images/pantomime_beans.png"}}, {"model": "core.productphoto", "pk": 18, "fields": {"product": 2, "image": "products/images/pantomime_beans_J2bFBiH.png"}}, {"model": "core.productphoto", "pk": 19, "fields": {"product": 4, "image": "products/images/decaf_800.png"}}, {"model": "core.productphoto", "pk": 20, "fields": {"product": 4, "image": "products/images/pantomime_beans_Lo0hJRx.png"}}, {"model": "core.coupon", "pk": 1, "fields": {"type": "entire_order", "name": "Launch", "code": "LAUNCH22", "valid_from": "2022-03-23T06:00:00Z", "valid_to": "2022-04-02T06:00:00Z", "discount_value_type": "percentage", "discount_value": "5.00", "products": []}}, {"model": "core.coupon", "pk": 2, "fields": {"type": "entire_order", "name": "Launch", "code": "LAUNCHFIX", "valid_from": "2022-04-01T06:00:00Z", "valid_to": "2022-04-27T06:00:00Z", "discount_value_type": "fixed", "discount_value": "5.00", "products": []}}, {"model": "core.coupon", "pk": 3, "fields": {"type": "entire_order", "name": "10% off", "code": "PT1022", "valid_from": "2022-04-08T06:00:00Z", "valid_to": "2022-04-30T06:00:00Z", "discount_value_type": "percentage", "discount_value": "10.00", "products": []}}, {"model": "core.shippingmethod", "pk": 1, "fields": {"name": "USPS", "type": "price", "price": "10.00"}}, {"model": "core.shippingmethod", "pk": 2, "fields": {"name": "USPS", "type": "weight", "price": "10.00"}}, {"model": "core.order", "pk": 1, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T17:18:59.584Z", "updated_at": "2022-03-15T17:18:59.584Z"}}, {"model": "core.order", "pk": 2, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T17:22:18.440Z", "updated_at": "2022-03-15T17:22:18.440Z"}}, {"model": "core.order", "pk": 3, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T17:26:27.869Z", "updated_at": "2022-03-15T17:26:27.869Z"}}, {"model": "core.order", "pk": 4, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T18:14:16.587Z", "updated_at": "2022-03-15T18:14:16.587Z"}}, {"model": "core.order", "pk": 5, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T18:16:59.460Z", "updated_at": "2022-03-15T18:16:59.460Z"}}, {"model": "core.order", "pk": 6, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 2, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T18:23:13.283Z", "updated_at": "2022-03-15T18:23:13.283Z"}}, {"model": "core.order", "pk": 7, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T18:29:02.632Z", "updated_at": "2022-03-15T18:29:02.632Z"}}, {"model": "core.order", "pk": 8, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 2, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T19:13:50.050Z", "updated_at": "2022-03-15T19:13:50.050Z"}}, {"model": "core.order", "pk": 9, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 2, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T19:15:18.843Z", "updated_at": "2022-03-15T19:15:18.843Z"}}, {"model": "core.order", "pk": 10, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 2, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T19:17:21.952Z", "updated_at": "2022-03-15T19:17:21.952Z"}}, {"model": "core.order", "pk": 11, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:22:34.503Z", "updated_at": "2022-03-15T19:22:34.503Z"}}, {"model": "core.order", "pk": 12, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:25:35.313Z", "updated_at": "2022-03-15T19:25:35.313Z"}}, {"model": "core.order", "pk": 13, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:26:51.478Z", "updated_at": "2022-03-15T19:26:51.478Z"}}, {"model": "core.order", "pk": 14, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:30:28.497Z", "updated_at": "2022-03-15T19:30:28.497Z"}}, {"model": "core.order", "pk": 15, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:36:30.561Z", "updated_at": "2022-03-15T19:36:30.561Z"}}, {"model": "core.order", "pk": 16, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:54:38.099Z", "updated_at": "2022-03-15T19:54:38.099Z"}}, {"model": "core.order", "pk": 17, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T19:56:49.477Z", "updated_at": "2022-03-15T19:56:49.477Z"}}, {"model": "core.order", "pk": 18, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T20:01:53.848Z", "updated_at": "2022-03-15T20:01:53.848Z"}}, {"model": "core.order", "pk": 19, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T20:09:31.510Z", "updated_at": "2022-03-15T20:09:31.510Z"}}, {"model": "core.order", "pk": 20, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T20:13:16.927Z", "updated_at": "2022-03-15T20:13:16.927Z"}}, {"model": "core.order", "pk": 21, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T20:14:43.333Z", "updated_at": "2022-03-15T20:14:43.333Z"}}, {"model": "core.order", "pk": 22, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T20:16:03.299Z", "updated_at": "2022-03-15T20:16:03.299Z"}}, {"model": "core.order", "pk": 23, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-03-15T20:17:32.842Z", "updated_at": "2022-03-15T20:17:32.842Z"}}, {"model": "core.order", "pk": 24, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-03-15T20:21:35.974Z", "updated_at": "2022-03-15T20:21:35.974Z"}}, {"model": "core.order", "pk": 25, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T20:22:11.717Z", "updated_at": "2022-03-15T20:22:11.717Z"}}, {"model": "core.order", "pk": 26, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-03-15T20:23:49.392Z", "updated_at": "2022-03-15T20:23:49.392Z"}}, {"model": "core.order", "pk": 27, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-03-15T20:25:04.787Z", "updated_at": "2022-03-15T20:25:04.787Z"}}, {"model": "core.order", "pk": 28, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-03-15T20:27:47.933Z", "updated_at": "2022-03-15T20:27:47.933Z"}}, {"model": "core.order", "pk": 29, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T20:30:40.141Z", "updated_at": "2022-03-15T20:30:40.141Z"}}, {"model": "core.order", "pk": 30, "fields": {"customer": 1, "status": "partially_fulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-03-15T20:32:09.015Z", "updated_at": "2022-03-23T16:02:59.305Z"}}, {"model": "core.order", "pk": 31, "fields": {"customer": null, "status": "fulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-03-23T16:59:10.471Z", "updated_at": "2022-03-23T17:00:17.128Z"}}, {"model": "core.order", "pk": 32, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "25.46", "weight": "0.0:oz", "created_at": "2022-03-23T21:22:54.950Z", "updated_at": "2022-03-23T21:22:54.950Z"}}, {"model": "core.order", "pk": 33, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 1, "shipping_total": "0.00", "total_net_amount": "12.73", "weight": "0.0:oz", "created_at": "2022-03-23T21:30:54.290Z", "updated_at": "2022-03-23T21:30:54.290Z"}}, {"model": "core.order", "pk": 34, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 1, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-03-23T21:45:57.399Z", "updated_at": "2022-03-23T21:45:57.399Z"}}, {"model": "core.order", "pk": 35, "fields": {"customer": 1, "status": "fulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 1, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-03-23T21:52:22.463Z", "updated_at": "2022-03-25T16:51:04.837Z"}}, {"model": "core.order", "pk": 36, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 1, "shipping_total": "0.00", "total_net_amount": "67.00", "weight": "0.0:oz", "created_at": "2022-04-01T17:09:34.892Z", "updated_at": "2022-04-01T17:09:34.892Z"}}, {"model": "core.order", "pk": 37, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 2, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-04T00:02:12.247Z", "updated_at": "2022-04-04T00:02:12.247Z"}}, {"model": "core.order", "pk": 38, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 2, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-04T00:03:44.789Z", "updated_at": "2022-04-04T00:03:44.789Z"}}, {"model": "core.order", "pk": 39, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 2, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-04-06T01:18:18.633Z", "updated_at": "2022-04-06T01:18:18.633Z"}}, {"model": "core.order", "pk": 40, "fields": {"customer": 1, "status": "fulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 2, "shipping_total": "0.00", "total_net_amount": "67.00", "weight": "0.0:oz", "created_at": "2022-04-06T17:48:39.005Z", "updated_at": "2022-04-06T18:04:31.040Z"}}, {"model": "core.order", "pk": 41, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 2, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-04-06T18:00:15.976Z", "updated_at": "2022-04-06T18:00:15.976Z"}}, {"model": "core.order", "pk": 42, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": 2, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-04-06T18:01:51.206Z", "updated_at": "2022-04-06T18:01:51.206Z"}}, {"model": "core.order", "pk": 43, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:18:58.958Z", "updated_at": "2022-04-15T03:18:58.958Z"}}, {"model": "core.order", "pk": 44, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:19:14.980Z", "updated_at": "2022-04-15T03:19:14.980Z"}}, {"model": "core.order", "pk": 45, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:21:45.918Z", "updated_at": "2022-04-15T03:21:45.918Z"}}, {"model": "core.order", "pk": 46, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:22:58.009Z", "updated_at": "2022-04-15T03:22:58.009Z"}}, {"model": "core.order", "pk": 47, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:24:22.731Z", "updated_at": "2022-04-15T03:24:22.731Z"}}, {"model": "core.order", "pk": 48, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:24:38.585Z", "updated_at": "2022-04-15T03:24:38.585Z"}}, {"model": "core.order", "pk": 49, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-15T03:26:19.552Z", "updated_at": "2022-04-15T03:26:19.552Z"}}, {"model": "core.order", "pk": 50, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-04-23T20:51:39.679Z", "updated_at": "2022-04-23T20:51:39.679Z"}}, {"model": "core.order", "pk": 51, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-04-23T20:55:39.285Z", "updated_at": "2022-04-23T20:55:39.285Z"}}, {"model": "core.order", "pk": 52, "fields": {"customer": 1, "status": "partially_fulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "26.80", "weight": "0.0:oz", "created_at": "2022-04-23T21:00:39.249Z", "updated_at": "2022-04-24T03:38:54.039Z"}}, {"model": "core.order", "pk": 53, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T16:34:28.911Z", "updated_at": "2022-04-24T16:34:28.911Z"}}, {"model": "core.order", "pk": 54, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T16:37:32.671Z", "updated_at": "2022-04-24T16:37:32.671Z"}}, {"model": "core.order", "pk": 55, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T16:41:55.368Z", "updated_at": "2022-04-24T16:41:55.368Z"}}, {"model": "core.order", "pk": 56, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T16:47:43.438Z", "updated_at": "2022-04-24T16:47:43.438Z"}}, {"model": "core.order", "pk": 57, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T16:49:10.526Z", "updated_at": "2022-04-24T16:49:10.526Z"}}, {"model": "core.order", "pk": 58, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T16:49:18.644Z", "updated_at": "2022-04-24T16:49:18.645Z"}}, {"model": "core.order", "pk": 59, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-04-24T17:01:14.133Z", "updated_at": "2022-04-24T17:01:14.133Z"}}, {"model": "core.order", "pk": 60, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-04-24T17:03:50.880Z", "updated_at": "2022-04-24T17:03:50.880Z"}}, {"model": "core.order", "pk": 61, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-04-24T17:19:22.528Z", "updated_at": "2022-04-24T17:19:22.528Z"}}, {"model": "core.order", "pk": 62, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "53.60", "weight": "0.0:oz", "created_at": "2022-04-24T17:23:48.946Z", "updated_at": "2022-04-24T17:23:48.946Z"}}, {"model": "core.order", "pk": 63, "fields": {"customer": 1, "status": "draft", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T17:35:04.209Z", "updated_at": "2022-04-24T17:35:04.209Z"}}, {"model": "core.order", "pk": 64, "fields": {"customer": 1, "status": "draft", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T17:35:40.334Z", "updated_at": "2022-04-24T17:35:40.334Z"}}, {"model": "core.order", "pk": 65, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T17:36:27.559Z", "updated_at": "2022-04-24T17:36:46.155Z"}}, {"model": "core.order", "pk": 66, "fields": {"customer": 1, "status": "draft", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "9.55", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-24T17:52:07.802Z", "updated_at": "2022-04-24T17:52:07.802Z"}}, {"model": "core.order", "pk": 67, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "12.47", "total_net_amount": "40.20", "weight": "0.0:oz", "created_at": "2022-04-24T17:52:59.926Z", "updated_at": "2022-04-24T17:53:38.188Z"}}, {"model": "core.order", "pk": 68, "fields": {"customer": 1, "status": "draft", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "9.55", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-24T17:57:18.399Z", "updated_at": "2022-04-24T17:57:18.399Z"}}, {"model": "core.order", "pk": 69, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "9.55", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-24T18:36:43.689Z", "updated_at": "2022-04-24T18:37:06.954Z"}}, {"model": "core.order", "pk": 70, "fields": {"customer": 1, "status": "draft", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "0.00", "total_net_amount": "0.00", "weight": "0.0:oz", "created_at": "2022-04-24T20:44:10.464Z", "updated_at": "2022-04-24T20:44:10.464Z"}}, {"model": "core.order", "pk": 71, "fields": {"customer": 1, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "9.55", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-24T20:44:28.234Z", "updated_at": "2022-04-24T20:44:44.522Z"}}, {"model": "core.order", "pk": 72, "fields": {"customer": null, "status": "unfulfilled", "billing_address": null, "shipping_address": 1, "shipping_method": null, "coupon": null, "shipping_total": "9.55", "total_net_amount": "13.40", "weight": "0.0:oz", "created_at": "2022-04-24T21:06:59.696Z", "updated_at": "2022-04-24T21:07:17.313Z"}}, {"model": "core.transaction", "pk": 1, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 1}}, {"model": "core.transaction", "pk": 2, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 2}}, {"model": "core.transaction", "pk": 3, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 3}}, {"model": "core.transaction", "pk": 4, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 4}}, {"model": "core.transaction", "pk": 5, "fields": {"status": "COMPLETED", "paypal_id": "0LW426388F117535H", "confirmation_email_sent": true, "order": 5}}, {"model": "core.transaction", "pk": 6, "fields": {"status": "COMPLETED", "paypal_id": "13S0651595676122G", "confirmation_email_sent": true, "order": 6}}, {"model": "core.transaction", "pk": 7, "fields": {"status": "COMPLETED", "paypal_id": "4R43143900266793G", "confirmation_email_sent": true, "order": 7}}, {"model": "core.transaction", "pk": 8, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 8}}, {"model": "core.transaction", "pk": 9, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 9}}, {"model": "core.transaction", "pk": 10, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 10}}, {"model": "core.transaction", "pk": 11, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 11}}, {"model": "core.transaction", "pk": 12, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 12}}, {"model": "core.transaction", "pk": 13, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 13}}, {"model": "core.transaction", "pk": 14, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 14}}, {"model": "core.transaction", "pk": 15, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 15}}, {"model": "core.transaction", "pk": 16, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 16}}, {"model": "core.transaction", "pk": 17, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 17}}, {"model": "core.transaction", "pk": 18, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 18}}, {"model": "core.transaction", "pk": 19, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 19}}, {"model": "core.transaction", "pk": 20, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 20}}, {"model": "core.transaction", "pk": 21, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 21}}, {"model": "core.transaction", "pk": 22, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 22}}, {"model": "core.transaction", "pk": 23, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 23}}, {"model": "core.transaction", "pk": 24, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 24}}, {"model": "core.transaction", "pk": 25, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 25}}, {"model": "core.transaction", "pk": 26, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 26}}, {"model": "core.transaction", "pk": 27, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 27}}, {"model": "core.transaction", "pk": 28, "fields": {"status": "COMPLETED", "paypal_id": "0TA35228KR250201Y", "confirmation_email_sent": true, "order": 28}}, {"model": "core.transaction", "pk": 29, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 29}}, {"model": "core.transaction", "pk": 30, "fields": {"status": "COMPLETED", "paypal_id": "57K00395W33936937", "confirmation_email_sent": true, "order": 30}}, {"model": "core.transaction", "pk": 31, "fields": {"status": "COMPLETED", "paypal_id": "2AB097351X341430G", "confirmation_email_sent": true, "order": 31}}, {"model": "core.transaction", "pk": 32, "fields": {"status": "COMPLETED", "paypal_id": "50Y83984C7682442F", "confirmation_email_sent": true, "order": 32}}, {"model": "core.transaction", "pk": 33, "fields": {"status": "COMPLETED", "paypal_id": "32U3216986193094S", "confirmation_email_sent": true, "order": 33}}, {"model": "core.transaction", "pk": 34, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 34}}, {"model": "core.transaction", "pk": 35, "fields": {"status": "COMPLETED", "paypal_id": "3YG43897RL514852W", "confirmation_email_sent": true, "order": 35}}, {"model": "core.transaction", "pk": 36, "fields": {"status": "COMPLETED", "paypal_id": "62J41768F8371672K", "confirmation_email_sent": true, "order": 36}}, {"model": "core.transaction", "pk": 37, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 37}}, {"model": "core.transaction", "pk": 38, "fields": {"status": "COMPLETED", "paypal_id": "42R01537CU6191354", "confirmation_email_sent": true, "order": 38}}, {"model": "core.transaction", "pk": 39, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 39}}, {"model": "core.transaction", "pk": 40, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 40}}, {"model": "core.transaction", "pk": 41, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 41}}, {"model": "core.transaction", "pk": 42, "fields": {"status": "COMPLETED", "paypal_id": "11P5779103278194P", "confirmation_email_sent": true, "order": 42}}, {"model": "core.transaction", "pk": 43, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 43}}, {"model": "core.transaction", "pk": 44, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 44}}, {"model": "core.transaction", "pk": 45, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 45}}, {"model": "core.transaction", "pk": 46, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 46}}, {"model": "core.transaction", "pk": 47, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 47}}, {"model": "core.transaction", "pk": 48, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 48}}, {"model": "core.transaction", "pk": 49, "fields": {"status": "COMPLETED", "paypal_id": "51W11259NB1964139", "confirmation_email_sent": true, "order": 49}}, {"model": "core.transaction", "pk": 50, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 50}}, {"model": "core.transaction", "pk": 51, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 51}}, {"model": "core.transaction", "pk": 52, "fields": {"status": "COMPLETED", "paypal_id": "1VM23532J4176390A", "confirmation_email_sent": true, "order": 52}}, {"model": "core.transaction", "pk": 53, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 53}}, {"model": "core.transaction", "pk": 54, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 54}}, {"model": "core.transaction", "pk": 55, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 55}}, {"model": "core.transaction", "pk": 56, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 56}}, {"model": "core.transaction", "pk": 57, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 57}}, {"model": "core.transaction", "pk": 58, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 58}}, {"model": "core.transaction", "pk": 59, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 59}}, {"model": "core.transaction", "pk": 60, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 60}}, {"model": "core.transaction", "pk": 61, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 61}}, {"model": "core.transaction", "pk": 62, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 62}}, {"model": "core.transaction", "pk": 63, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 63}}, {"model": "core.transaction", "pk": 64, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 64}}, {"model": "core.transaction", "pk": 65, "fields": {"status": "COMPLETED", "paypal_id": "9JY26881X6142292C", "confirmation_email_sent": true, "order": 65}}, {"model": "core.transaction", "pk": 66, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 66}}, {"model": "core.transaction", "pk": 67, "fields": {"status": "COMPLETED", "paypal_id": "2BF52322HE029645G", "confirmation_email_sent": true, "order": 67}}, {"model": "core.transaction", "pk": 68, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 68}}, {"model": "core.transaction", "pk": 69, "fields": {"status": "COMPLETED", "paypal_id": "08384804KY645931W", "confirmation_email_sent": true, "order": 69}}, {"model": "core.transaction", "pk": 70, "fields": {"status": "CREATED", "paypal_id": "", "confirmation_email_sent": false, "order": 70}}, {"model": "core.transaction", "pk": 71, "fields": {"status": "COMPLETED", "paypal_id": "0U889767CY788263U", "confirmation_email_sent": true, "order": 71}}, {"model": "core.transaction", "pk": 72, "fields": {"status": "COMPLETED", "paypal_id": "2V44438147001873S", "confirmation_email_sent": true, "order": 72}}, {"model": "core.orderline", "pk": 1, "fields": {"order": 30, "product": 1, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans ", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 2, "fields": {"order": 30, "product": 3, "quantity": 1, "quantity_fulfilled": 1, "customer_note": "Whole Beans ", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 3, "fields": {"order": 31, "product": 8, "quantity": 1, "quantity_fulfilled": 1, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 4, "fields": {"order": 31, "product": 7, "quantity": 1, "quantity_fulfilled": 1, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 5, "fields": {"order": 32, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 6, "fields": {"order": 32, "product": 6, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 7, "fields": {"order": 33, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 8, "fields": {"order": 34, "product": 6, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 9, "fields": {"order": 35, "product": 6, "quantity": 2, "quantity_fulfilled": 2, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 10, "fields": {"order": 36, "product": 3, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 11, "fields": {"order": 36, "product": 1, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 12, "fields": {"order": 37, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 13, "fields": {"order": 38, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 14, "fields": {"order": 39, "product": 3, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 15, "fields": {"order": 39, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 16, "fields": {"order": 40, "product": 3, "quantity": 3, "quantity_fulfilled": 3, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 17, "fields": {"order": 40, "product": 2, "quantity": 2, "quantity_fulfilled": 2, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 18, "fields": {"order": 41, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 19, "fields": {"order": 41, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 20, "fields": {"order": 42, "product": 6, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 21, "fields": {"order": 42, "product": 8, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 22, "fields": {"order": 43, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 23, "fields": {"order": 44, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 24, "fields": {"order": 45, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 25, "fields": {"order": 46, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 26, "fields": {"order": 47, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 27, "fields": {"order": 48, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 28, "fields": {"order": 49, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 29, "fields": {"order": 50, "product": 3, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 30, "fields": {"order": 51, "product": 3, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 31, "fields": {"order": 52, "product": 3, "quantity": 2, "quantity_fulfilled": 1, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 32, "fields": {"order": 53, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 33, "fields": {"order": 54, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 34, "fields": {"order": 55, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 35, "fields": {"order": 59, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 36, "fields": {"order": 59, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 37, "fields": {"order": 60, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 38, "fields": {"order": 60, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 39, "fields": {"order": 61, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 40, "fields": {"order": 61, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 41, "fields": {"order": 62, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 42, "fields": {"order": 62, "product": 4, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 43, "fields": {"order": 63, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 44, "fields": {"order": 64, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 45, "fields": {"order": 65, "product": 3, "quantity": 3, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 46, "fields": {"order": 66, "product": 3, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 47, "fields": {"order": 67, "product": 3, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 48, "fields": {"order": 67, "product": 2, "quantity": 2, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 49, "fields": {"order": 68, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 50, "fields": {"order": 69, "product": 2, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 51, "fields": {"order": 71, "product": 3, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.orderline", "pk": 52, "fields": {"order": 72, "product": 3, "quantity": 1, "quantity_fulfilled": 0, "customer_note": "Whole Beans", "currency": "USD", "unit_price": "13.40", "tax_rate": "2.00"}}, {"model": "core.trackingnumber", "pk": 1, "fields": {"order": 30, "tracking_id": "1938479823", "created_at": "2022-03-23T17:04:21.540Z", "updated_at": "2022-03-23T17:04:21.549Z"}}, {"model": "core.trackingnumber", "pk": 2, "fields": {"order": 30, "tracking_id": "1938479823", "created_at": "2022-03-23T17:04:21.540Z", "updated_at": "2022-03-23T17:04:21.549Z"}}, {"model": "core.trackingnumber", "pk": 3, "fields": {"order": 30, "tracking_id": "19283987", "created_at": "2022-03-23T17:04:21.540Z", "updated_at": "2022-03-23T17:04:21.549Z"}}, {"model": "core.trackingnumber", "pk": 4, "fields": {"order": 31, "tracking_id": "1233434", "created_at": "2022-03-23T17:04:21.540Z", "updated_at": "2022-03-23T17:04:21.549Z"}}, {"model": "core.trackingnumber", "pk": 5, "fields": {"order": 35, "tracking_id": "792834987234", "created_at": "2022-03-30T16:14:33.549Z", "updated_at": "2022-03-30T16:14:33.549Z"}}, {"model": "core.trackingnumber", "pk": 6, "fields": {"order": 42, "tracking_id": "12312132", "created_at": "2022-04-06T18:02:55.655Z", "updated_at": "2022-04-06T18:02:55.655Z"}}, {"model": "core.trackingnumber", "pk": 7, "fields": {"order": 49, "tracking_id": "982734987324", "created_at": "2022-04-15T03:27:04.929Z", "updated_at": "2022-04-15T03:27:04.929Z"}}] \ No newline at end of file diff --git a/src/functional_tests/__init__.py b/src/functional_tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/functional_tests/tests_home.py b/src/functional_tests/tests_home.py new file mode 100644 index 0000000..12ca962 --- /dev/null +++ b/src/functional_tests/tests_home.py @@ -0,0 +1,32 @@ +import os, time +from selenium.webdriver.firefox.webdriver import WebDriver +from selenium.webdriver.common.keys import Keys +from selenium.common.exceptions import WebDriverException +from django.contrib.staticfiles.testing import StaticLiveServerTestCase + +class HomeTests(StaticLiveServerTestCase): + fixtures = ['accounts.json', 'products.json'] + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.browser = WebDriver() + + @classmethod + def tearDownClass(cls): + cls.browser.quit() + super().tearDownClass() + + def test_home_page_has_product_list(self): + self.login() + self.assertTrue( + self.browser.find_element_by_css_selector('.product__list') + ) + + def login(self): + self.browser.get('%s%s' % (self.live_server_url, '/accounts/login/')) + username_input = self.browser.find_element_by_name("login") + username_input.send_keys('john@example.com') + password_input = self.browser.find_element_by_name("password") + password_input.send_keys('Bf25XBdP4vdt2X9L') + self.browser.find_element_by_xpath('//input[@value="Login"]').click() diff --git a/src/storefront/cart.py b/src/storefront/cart.py index e07ef79..c4596ff 100644 --- a/src/storefront/cart.py +++ b/src/storefront/cart.py @@ -172,7 +172,10 @@ class Cart: def create_order(self): params = self.build_order_params() logger.info(f'\nParams: {params}\n') - response = CreateOrder().create_order(params, debug=True) + if settings.DEBUG: + response = CreateOrder().create_order(params, debug=True) + else: + response = CreateOrder().create_order(params) return response def build_bulk_list(self, order): diff --git a/src/storefront/payments.py b/src/storefront/payments.py index 85ab92d..8879c8c 100644 --- a/src/storefront/payments.py +++ b/src/storefront/payments.py @@ -11,6 +11,8 @@ from django.conf import settings from django.contrib.sites.models import Site from django.urls import reverse_lazy +from core import CoffeeGrind + logger = logging.getLogger(__name__) class PayPalClient: @@ -74,9 +76,11 @@ class CreateOrder(PayPalClient): # Shows within upper-right dropdown during payment approval 'name': f'{item["product"]}', # Item details will also be in the completed paypal.com transaction view - 'description': 'Coffee', + + 'description': ', '.join([next((f"{value['quantity']} x {v[1]}" for i, v in enumerate(CoffeeGrind.GRIND_CHOICES) if v[0] == key), None) + for key, value in item['variations'].items()]), 'unit_amount': { - 'currency_code': 'USD', + 'currency_code': settings.DEFAULT_CURRENCY, 'value': f'{item["price"]}' }, 'quantity': f'{item["quantity"]}' @@ -143,18 +147,16 @@ class CreateOrder(PayPalClient): request.request_body(self.build_request_body(params)) response = self.client.execute(request) if debug: - logger.info(f'\nStatus Code: {response.status_code}', ) - logger.info(f'\nStatus: {response.result.status}', ) - logger.info(f'\nOrder ID: {response.result.id}', ) - logger.info(f'\nIntent: {response.result.intent}', ) - logger.info(f"\njson_data: {response.result}") + logger.debug(f'\nStatus Code: {response.status_code}', ) + logger.debug(f'\nStatus: {response.result.status}', ) + logger.debug(f'\nOrder ID: {response.result.id}', ) + logger.debug(f'\nIntent: {response.result.intent}', ) + logger.debug(f"\njson_data: {response.result}") return response class CaptureOrder(PayPalClient): - """this is the sample function performing payment capture on the order. Approved Order id should be passed as an argument to this function""" - def capture_order(self, order_id, debug=False): """Method to capture order using order_id""" request = OrdersCaptureRequest(order_id) diff --git a/src/storefront/tests/__init__.py b/src/storefront/tests/__init__.py new file mode 100644 index 0000000..3a9ddea --- /dev/null +++ b/src/storefront/tests/__init__.py @@ -0,0 +1,43 @@ +class RequestFaker: + REQUEST_BODY = { + 'intent': 'CAPTURE', + 'application_context': { + 'return_url': 'https://example.com/done/', + 'cancel_url': 'https://example.com/canceled/', + 'brand_name': 'example.com', + }, + 'purchase_units': [ + { + 'description': 'Coffee', + 'amount': { + 'currency_code': 'USD', + 'value': '13.40', + 'breakdown': { + 'item_total': {'currency_code': 'USD', 'value': '13.40'}, + 'shipping': {'currency_code': 'USD', 'value': '0.00'}, + 'tax_total': {'currency_code': 'USD', 'value': '0'}, + 'discount': {'currency_code': 'USD', 'value': '0'}, + }, + }, + 'items': [ + { + 'name': 'Decaf', + 'description': '1 x Whole Beans, 2 x Percolator', + 'unit_amount': {'currency_code': 'USD', 'value': '13.40'}, + 'quantity': '3', + } + ], + 'shipping': { + 'method': 'US POSTAL SERVICE', + 'address': { + 'address_line_1': '1504 N 230 E', + 'address_line_2': '', + 'admin_area_2': 'North Logan', + 'admin_area_1': 'UT', + 'postal_code': '84341', + 'country_code': 'US', + }, + }, + } + ], + } diff --git a/src/storefront/tests.py b/src/storefront/tests/test_cart.py similarity index 76% rename from src/storefront/tests.py rename to src/storefront/tests/test_cart.py index 53482ee..8935654 100644 --- a/src/storefront/tests.py +++ b/src/storefront/tests/test_cart.py @@ -10,22 +10,12 @@ from paypalcheckoutsdk.core import PayPalHttpClient, SandboxEnvironment from accounts.models import User, Address from core.models import Product, Order - -from .views import OrderCreateView -from .cart import Cart +from core import CoffeeGrind +from storefront.views import OrderCreateView +from storefront.cart import Cart logger = logging.getLogger(__name__) -WHOLE = 'whole-beans' -ESPRESSO = 'espresso' -CONE_DRIP = 'cone-drip' -BASKET_DRIP = 'basket-drip' -FRENCH_PRESS = 'french-press' -STOVETOP_ESPRESSO = 'stovetop-espresso' -AEROPRESS = 'aeropress' -PERCOLATOR = 'percolator' -CAFE_STYLE = 'cafe-style' - class CartTest(TestCase): def setUp(self): self.client = Client() @@ -48,35 +38,21 @@ class CartTest(TestCase): ) self.client.force_login(self.customer) - - def test_post_checkout_form(self): - url = reverse('storefront:order-create') - response = self.client.get(url) - self.assertTemplateUsed(response, 'storefront/order_form.html') - - request = response.wsgi_request - cart = Cart(request) - cart.add( - request, - product=self.product, - quantity=1, - grind=WHOLE, - update_quantity=False - ) - - params = { - 'email': 'nathanchapman@hey.com', + self.client.session['shipping_address'] = { 'first_name': 'Nathan', 'last_name': 'Chapman', - 'total_net_amount': 26.80 + 'email': 'contact@nathanjchapman.com', + 'street_address_1': '1504 N 230 E', + 'street_address_2': '', + 'city': 'North Logan', + 'state': 'UT', + 'postal_code': '84341' } - response = self.client.post(url, params) - self.assertContains(response, 'Checkout', status_code=200) - def test_cart_item_variations(self): cart_detail_url = reverse('storefront:cart-detail') - response = self.client.get(cart_detail_url) + response = self.client.get(cart_detail_url, follow=True) + logger.debug(response.context['messages']) request = response.wsgi_request cart = Cart(request) @@ -85,14 +61,14 @@ class CartTest(TestCase): request, product=self.product, quantity=1, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=False ) cart.add( request, product=self.product, quantity=1, - grind=ESPRESSO, + grind=CoffeeGrind.ESPRESSO, update_quantity=False ) for item in cart.cart.values(): @@ -109,11 +85,11 @@ class CartTest(TestCase): request, product=self.product, quantity=1, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=False ) - self.assertEqual(cart.cart[f'{self.product.id}']['variations'][WHOLE]['quantity'], 1) + self.assertEqual(cart.cart[f'{self.product.id}']['variations'][CoffeeGrind.WHOLE]['quantity'], 1) self.assertEqual(len(cart), 1) self.assertEqual(sum(cart.get_item_prices()), Decimal('13.4')) self.assertEqual(cart.get_total_price(), Decimal('13.4')) @@ -121,20 +97,20 @@ class CartTest(TestCase): request, product=self.product, quantity=1, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=False ) - self.assertEqual(cart.cart[f'{self.product.id}']['variations'][WHOLE]['quantity'], 2) + self.assertEqual(cart.cart[f'{self.product.id}']['variations'][CoffeeGrind.WHOLE]['quantity'], 2) self.assertEqual(len(cart), 2) cart.add( request, product=self.product, quantity=3, - grind=ESPRESSO, + grind=CoffeeGrind.ESPRESSO, update_quantity=False ) - self.assertEqual(cart.cart[f'{self.product.id}']['variations'][ESPRESSO]['quantity'], 3) + self.assertEqual(cart.cart[f'{self.product.id}']['variations'][CoffeeGrind.ESPRESSO]['quantity'], 3) self.assertEqual(len(cart), 5) self.assertEqual(cart.get_total_price(), Decimal('67')) @@ -149,19 +125,19 @@ class CartTest(TestCase): request, product=self.product, quantity=3, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=False ) - self.assertEqual(cart.cart[f'{self.product.id}']['variations'][WHOLE]['quantity'], 3) + self.assertEqual(cart.cart[f'{self.product.id}']['variations'][CoffeeGrind.WHOLE]['quantity'], 3) cart.add( request, product=self.product, quantity=1, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=True ) - self.assertEqual(cart.cart[f'{self.product.id}']['variations'][WHOLE]['quantity'], 1) + self.assertEqual(cart.cart[f'{self.product.id}']['variations'][CoffeeGrind.WHOLE]['quantity'], 1) def test_cart_remove_item(self): cart_detail_url = reverse('storefront:cart-detail') @@ -174,7 +150,7 @@ class CartTest(TestCase): request, product=self.product, quantity=3, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=False ) self.assertEqual(len(cart), 3) @@ -192,9 +168,10 @@ class CartTest(TestCase): request, product=self.product, quantity=3, - grind=WHOLE, + grind=CoffeeGrind.WHOLE, update_quantity=False ) self.assertEqual(cart.get_total_weight(), Decimal(48)) -# 96oz + def test_cart_(self): + pass diff --git a/src/storefront/tests/test_payments.py b/src/storefront/tests/test_payments.py new file mode 100644 index 0000000..8099658 --- /dev/null +++ b/src/storefront/tests/test_payments.py @@ -0,0 +1,73 @@ +import logging +from decimal import Decimal + +from measurement.measures import Weight +from django.test import TestCase, Client, RequestFactory +from django.urls import reverse +from django.conf import settings +from django.contrib.sessions.middleware import SessionMiddleware +from paypalcheckoutsdk.orders import OrdersCreateRequest, OrdersCaptureRequest +from paypalcheckoutsdk.core import PayPalHttpClient, SandboxEnvironment + +from accounts.models import User, Address +from core.models import Product, Order +from core import CoffeeGrind +from storefront.views import OrderCreateView +from storefront.cart import Cart +from storefront.payments import CreateOrder + +from . import RequestFaker + +logger = logging.getLogger(__name__) + +class CreateOrderTest(TestCase): + def setUp(self): + self.client = Client() + self.product = Product.objects.create( + name='Decaf', + description='Coffee', + sku='23987', + price=Decimal('13.40'), + weight=Weight(oz=16), + visible_in_listings=True + ) + + def test_build_request_body(self): + product_list_url = reverse('storefront:product-list') + response = self.client.get(product_list_url, follow=True) + request = response.wsgi_request + + cart = Cart(request) + cart.add( + request, + product=self.product, + quantity=1, + grind=CoffeeGrind.WHOLE, + update_quantity=False + ) + cart.add( + request, + product=self.product, + quantity=2, + grind=CoffeeGrind.PERCOLATOR, + update_quantity=False + ) + params = { + 'items': cart, + 'total_price': '13.40', + 'item_total': '13.40', + 'discount': '0', + 'shipping_price': '0.00', + 'tax_total': '0', + 'shipping_method': 'US POSTAL SERVICE', + 'shipping_address': { + 'address_line_1': '1504 N 230 E', + 'address_line_2': '', + 'admin_area_2': 'North Logan', + 'admin_area_1': 'UT', + 'postal_code': '84341', + 'country_code': 'US', + }, + } + request_body = CreateOrder().build_request_body(params) + self.assertDictEqual(RequestFaker.REQUEST_BODY, request_body) diff --git a/src/storefront/views.py b/src/storefront/views.py index 625ac6d..a915cb5 100644 --- a/src/storefront/views.py +++ b/src/storefront/views.py @@ -231,7 +231,6 @@ class OrderCreateView(CreateView): return context def form_valid(self, form): - # TODO: make order status "Draft" and then in the PP capture set status appropriately cart = Cart(self.request) shipping_address = self.request.session.get('shipping_address') form.instance.customer, form.instance.shipping_address = get_or_create_customer(self.request, form, shipping_address)