-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b1e747
commit f442826
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import frappe | ||
from frappe.utils import now_datetime | ||
from frappe.desk.page.setup_wizard.setup_wizard import setup_complete | ||
|
||
|
||
def before_tests(): | ||
# complete setup if missing | ||
year = now_datetime().year | ||
if not frappe.get_list("Company"): | ||
setup_complete( | ||
{ | ||
"currency": "EUR", | ||
"full_name": "Test User", | ||
"company_name": "Bolt Trades", | ||
"timezone": "Europe/Berlin", | ||
"company_abbr": "BT", | ||
"industry": "Manufacturing", | ||
"country": "Germany", | ||
"fy_start_date": f"{year}-01-01", | ||
"fy_end_date": f"{year}-12-31", | ||
"language": "english", | ||
"company_tagline": "Testing", | ||
"email": "[email protected]", | ||
"password": "test", | ||
"chart_of_accounts": "Standard", | ||
} | ||
) | ||
|
||
frappe.db.commit() # nosemgrep |