Commit graph

43 commits

Author SHA1 Message Date
Gavin D'souza
d5b3fc04e0 fix: Breaking backup tests due to site settings 2022-01-13 13:25:32 +05:30
Gavin D'souza
9e281e7b19 refactor: Test Commands
* Separate out test case for backup cases
  * Split each case into separate tests
  * Add teardown to remove files geenrated in custom paths
* Rename test that wasn't running
* Rename test cases for consistency
2022-01-12 16:01:03 +05:30
ChillarAnand
8191fafa58 chore: Add test for archiving site before dropping 2021-12-28 16:04:37 +05:30
Gavin D'souza
0657524888 refactor: Retire color in favour of click.secho
* Add type hints for Command test suite
* Remove support utils - dead code
2021-11-25 12:49:43 +05:30
ritwik
5cfe3ad946
feat: add no-git option in make-app command and boilerplate generation (#15028) 2021-11-23 04:11:06 +00:00
Ankush Menat
35b242fe27
test: remove app unit tests 2021-10-12 17:33:29 +05:30
Mohammad Hasnain Mohsin Rajan
ae5cf9c32c
chore: change missing_in_backup function docstring 2021-09-12 19:09:05 +05:30
Ankush Menat
c663ab7d44
test: improve test failure message 2021-08-31 22:31:50 +05:30
Faris Ansari
47a21fb9a7 test: db.commit to release lock 2021-08-04 16:29:22 +05:30
Faris Ansari
fbd900aaff test: for set-password and set-admin-password 2021-08-02 15:28:25 +05:30
Gavin D'souza
01d275f667 style: Format code for better readability
* Remove trailing whitespaces
* Format code to fit module conventions
* Add appropriate new lines between imports, classes, fn defs, etc
* Added comments, docstrings & module headers
2021-07-28 18:55:27 +05:30
barredterra
fc2c887635 test: fix return code 2021-07-13 13:23:25 +02:00
barredterra
d7e0479ee7 test: add test for bench version 2021-07-05 19:53:02 +02:00
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
Ankush Menat
a077466b1e
chore: replace assertEquals with alias assertEqual
`assertEquals` has been deprecated, while not fully removed it will
still keep giving warnings in tests / CI.

ref: https://docs.python.org/3/library/unittest.html#deprecated-aliases
2021-05-06 21:16:22 +05:30
Gavin D'souza
bf9fcb3ff6 chore(cli): Add pending deprecation warning
* Add PDW for --as-dict in command set-config
* Move all top level imports inside each util to optimize imports for
  CLI
* Set always show filter for DeprecationWarning, PendingDeprecationWarning via frappe module
2021-05-05 15:33:44 +05:30
Gavin D'souza
3b34474f8d test: Add tests for bench show-config 2021-05-04 13:24:43 +05:30
Gavin D'souza
520143d43a test: Added tests for bench list-apps -f json 2021-05-03 12:38:57 +05:30
Faris Ansari
b181b69894 feat: Set default site using FRAPPE_SITE env var
Default site can now be set using the environment variable FRAPPE_SITE
An attempt to deprecate the use of currentsite.txt
2021-02-04 22:19:39 +05:30
Faris Ansari
9e954a7372 style: quotes 2020-12-10 13:52:21 +05:30
Faris Ansari
5a60048a0a test: for get_bench_relative_path 2020-12-10 12:31:01 +05:30
Gavin D'souza
f1cd3388ba style: Black-ish + fixed typos + Optimized imports 2020-11-17 16:29:54 +05:30
Gavin D'souza
2911799046 fix: Re-write restore tests to process another site 2020-11-17 15:14:23 +05:30
Gavin D'souza
84e2fcd6a8 fix: Add missing quote 2020-11-17 12:33:59 +05:30
Gavin D'souza
22b752ac21 test: Add tests for bench restore 2020-11-13 20:38:44 +05:30
Gavin D'souza
05c8e3c5a7 Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-11-13 19:44:17 +05:30
Gavin D'souza
a22cd461ac test: Commit after insert, not before count check 2020-11-10 13:34:48 +05:30
Gavin D'souza
34af8cb326 fix: Show partial backups when flag set
* in fetch_latest_backups whitelisted API
* BackupGenerator.get_recent_backup
2020-11-10 13:12:22 +05:30
Gavin D'souza
3fed5c7255 test: Add tests for bench partial-restore 2020-11-10 13:11:34 +05:30
Gavin D'souza
7394427df0 test: Add tests for bench list-apps 2020-11-09 16:45:21 +05:30
Gavin D'souza
fb0d1fbac1 Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-11-09 14:53:59 +05:30
Gavin D'souza
cb44492feb test: Added tests for bench remove-from-installed-apps 2020-11-03 13:55:26 +05:30
Aditya Hase
9d0ca3b72e
test(recorder): Test start-recording and stop-recording commands 2020-10-28 09:37:06 +05:30
Gavin D'souza
368a031da3 fix: Update postgres exlcude table data 2020-10-09 12:19:57 +05:30
Gavin D'souza
44a09191b3 fix: Use public schema for postgres site
tx @surajshetty3416
2020-10-08 19:29:20 +05:30
Gavin D'souza
104186906f feat: Show command execution summary in message format 2020-10-08 16:23:14 +05:30
Gavin D'souza
26387401b3 test: Added tests for bench backup skip tables
* Added utils for coloured outputs
* Fixed bug during last branch update
2020-10-07 21:10:30 +05:30
Gavin D'souza
89c2973ea8 test: Fix tests to map with functionality 2020-09-25 15:23:43 +05:30
Gavin D'souza
60e76e0606 fix: Enhancements for the BaseCommands class 2020-09-25 14:35:55 +05:30
Gavin D'souza
6ea47833ec test: Added tests for backup command 2020-09-25 14:35:38 +05:30
Gavin D'souza
5f299b191d chore: Added comments and style 2020-08-20 18:35:09 +05:30
Gavin D'souza
99496d97f3 test: Add tests for bench execute 2020-08-20 18:34:57 +05:30
Gavin D'souza
7c2510eb6a feat: Mini Test Suite for commands 2020-08-20 18:19:23 +05:30