Skip to content

Commit

Permalink
ci: fix broken tests due to regional separation (#196)
Browse files Browse the repository at this point in the history
* ci: fix broken tests due to regional separation

* ci: get payments app

* ci: reduce frequency for scheduled tests

* chore: dev version

* test: ignore india compliance fields
  • Loading branch information
ankush authored Aug 19, 2022
1 parent c2fdd5e commit 48d068a
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sed -i 's/schedule:/# schedule:/g' Procfile
sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile

bench get-app payments --branch develop
bench get-app erpnext --branch develop

bench start &
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- develop
- main
schedule:
# Run everday at midnight UTC / 5:30 IST
- cron: "0 0 * * *"
# Run every sunday at midnight UTC / 5:30 IST
- cron: "0 0 * * 0"

concurrency:
group: develop-${{ github.event.number }}
Expand Down
2 changes: 1 addition & 1 deletion ecommerce_integrations/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "2.0.0-dev"
4 changes: 0 additions & 4 deletions ecommerce_integrations/shopify/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ def setUpClass(cls):
"update_shopify_item_on_update": 1,
"update_erpnext_stock_levels_to_shopify": 1,
"doctype": "Shopify Setting",
"taxes": [
{"shopify_tax": "IGST", "tax_account": "Output Tax IGST - _TC",},
{"shopify_tax": "Standard", "tax_account": "Freight and Forwarding Charges - _TC",},
],
"shopify_warehouse_mapping": [
{
"shopify_location_id": "62279942297",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"customer_group": "Individual",
"fnf_account": "Freight and Forwarding Charges - WP",
"cod_account": "Freight and Forwarding Charges - WP",
"igst_account": "Output Tax IGST - WP",
"cgst_account": "Output Tax CGST - WP",
"sgst_account": "Output Tax SGST - WP",
"ugst_account": "Output Tax SGST - WP",
"tcs_account": "Output Tax SGST - WP",
"igst_account": "Output Tax GST - WP",
"cgst_account": "Output Tax GST - WP",
"sgst_account": "Output Tax GST - WP",
"ugst_account": "Output Tax GST - WP",
"tcs_account": "Output Tax GST - WP",
"cost_center": "Main - WP",
"cash_or_bank_account": "Cash - WP",
"gift_wrap_account": "Miscellaneous Expenses - WP",
Expand All @@ -31,11 +31,11 @@
"customer_group": "Individual",
"fnf_account": "Freight and Forwarding Charges - WP",
"cod_account": "Freight and Forwarding Charges - WP",
"igst_account": "Output Tax IGST - WP",
"cgst_account": "Output Tax CGST - WP",
"sgst_account": "Output Tax SGST - WP",
"ugst_account": "Output Tax SGST - WP",
"tcs_account": "Output Tax SGST - WP",
"igst_account": "Output Tax GST - WP",
"cgst_account": "Output Tax GST - WP",
"sgst_account": "Output Tax GST - WP",
"ugst_account": "Output Tax GST - WP",
"tcs_account": "Output Tax GST - WP",
"cost_center": "Main - WP",
"cash_or_bank_account": "Cash - WP",
"gift_wrap_account": "Miscellaneous Expenses - WP"
Expand Down
1 change: 0 additions & 1 deletion ecommerce_integrations/unicommerce/tests/test_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def test_import_item_from_unicommerce(self):
"brand": "TITANIUM",
"shelf_life_in_days": 0,
"disabled": 0,
"gst_hsn_code": "91011100",
"image": "https://user-images.githubusercontent.com/9079960/131f-650c52c07a0e.gif",
}
for field, value in expected_item.items():
Expand Down
26 changes: 26 additions & 0 deletions ecommerce_integrations/utils/before_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,31 @@ def before_tests():

frappe.db.set_value("Stock Settings", None, "auto_insert_price_list_rate_if_missing", 0)
enable_all_roles_and_domains()
create_tax_account()

frappe.db.commit()


def create_tax_account():
company = "Wind Power LLC"
account_name = "Output Tax GST"

parent = (
frappe.db.get_value("Account", {"company": company, "account_type": "Tax", "is_group": 1})
or "Duties and Taxes - WP"
)

frappe.get_doc(
{
"doctype": "Account",
"account_name": account_name,
"is_group": 0,
"company": company,
"root_type": "Liability",
"report_type": "Balance Sheet",
"account_currency": "INR",
"parent_account": parent,
"account_type": "Tax",
"tax_rate": 18,
}
).insert()

0 comments on commit 48d068a

Please sign in to comment.