Browse Source

chore: Remove comments, trailing whitespaces, etc

version-14
Gavin D'souza 3 years ago
parent
commit
0859a3060c
3 changed files with 2 additions and 4 deletions
  1. +1
    -0
      frappe/commands/utils.py
  2. +1
    -1
      frappe/core/doctype/user/test_user.py
  3. +0
    -3
      frappe/test_runner.py

+ 1
- 0
frappe/commands/utils.py View File

@@ -640,6 +640,7 @@ def run_tests(context, app=None, module=None, doctype=None, test=(), profile=Fal
skip_test_records=False, skip_before_tests=False, failfast=False, case=None): skip_test_records=False, skip_before_tests=False, failfast=False, case=None):


with CodeCoverage(coverage, app): with CodeCoverage(coverage, app):
import frappe
import frappe.test_runner import frappe.test_runner
tests = test tests = test
site = get_site(context) site = get_site(context)


+ 1
- 1
frappe/core/doctype/user/test_user.py View File

@@ -356,7 +356,7 @@ class TestUser(unittest.TestCase):
self.assertEqual(update_password(new_password, key=test_user.reset_password_key), "/") self.assertEqual(update_password(new_password, key=test_user.reset_password_key), "/")
update_password(old_password, old_password=new_password) update_password(old_password, old_password=new_password)
self.assertEqual( self.assertEqual(
json.loads(frappe.message_log[0]).get("message"),
json.loads(frappe.message_log[0]).get("message"),
"Password reset instructions have been sent to your email" "Password reset instructions have been sent to your email"
) )




+ 0
- 3
frappe/test_runner.py View File

@@ -55,9 +55,6 @@ def main(app=None, module=None, doctype=None, verbose=False, tests=(),
if not frappe.db: if not frappe.db:
frappe.connect() frappe.connect()


# if not frappe.conf.get("db_name").startswith("test_"):
# raise Exception, 'db_name must start with "test_"'

# workaround! since there is no separate test db # workaround! since there is no separate test db
frappe.clear_cache() frappe.clear_cache()
scheduler_disabled_by_user = frappe.utils.scheduler.is_scheduler_disabled() scheduler_disabled_by_user = frappe.utils.scheduler.is_scheduler_disabled()


Loading…
Cancel
Save