Commit graph

3112 commits

Author SHA1 Message Date
Kyle Lawlor
d42e548f07 Update minitwit & improve testing for examples (#1954)
* Update minitwit & improve testing for examples

* Related to #1945
* Re-works minitwit to be installed and run as:

    pip install --editable .
    export FLASK_APP=minitwit.minitwit
    export FLASK_DEBUG=1
    flask initdb
    flask run

* added flaskr and minitwit to norecursedirs
  * tests not properly run when using pytest standards
  * see: http://stackoverflow.com/questions/38313171/configuring-pytest-with-installable-examples-in-a-project
* Both flaskr and minitwit now follow pytest standards.
* Tests can for them as `py.test` or `python setup.py test`

* Update minitwit readme

* updates the instructions for running

* Fixes for updating the minitwit example

- This reverts the changes to the *docs/* (I will file separate PR).
- Running the app is now: `export FLASK_APP=minitwit` & `flask run`
  (After installing the app)

* Remove unnecessary comma from flaskr/setup.py
2016-08-22 20:52:54 +02:00
sanderl-mediamonks
5b867d25aa Use the correct Celery result backend setting 2016-08-22 11:49:52 +02:00
David Lord
1584022d0b clean up new json tests 2016-08-21 08:47:12 -07:00
Nathan Land
03104555cb Add tests for flask.json.dump() and test that jsonify correctly converts uuids. 2016-08-21 07:48:05 -07:00
Zev Averbach
796e1ef705 added indentation to changed structure 2016-08-20 17:13:07 -04:00
Anton Sarukhanov
1832130c2e Add test for get_version (CLI) (#1884) 2016-08-20 17:43:58 +02:00
SaturnR
ee84b877cb Update for python3 (#1973)
just updated print 'Initialized the database.' with print('Initialized the database.') to be python3 compliant
2016-08-20 17:43:10 +02:00
teichopsia-
92d9c0122c Update testing.rst (#1987)
Python 3.4.2
TypeError: Type str doesn't support the buffer API
2016-08-19 19:01:13 -07:00
Markus Unterwaditzer
c7387dd252 Bugfix: EnvironBuilder doesn't take json 2016-08-19 21:29:12 +02:00
Markus Unterwaditzer
025d3a541d Remove already defined method 2016-08-19 21:25:27 +02:00
Markus Unterwaditzer
e64d5c04fa testing: Make json a keyword arg 2016-08-19 21:24:07 +02:00
Adam Byrtek
1bfefbaa36 Remove _missing sentinel and update docs 2016-08-19 21:22:34 +02:00
Adam Byrtek
f5f46f56e6 Documentation updates 2016-08-19 21:21:43 +02:00
Adam Byrtek
9d6ebde480 Update documentation to use the getter only once 2016-08-19 21:20:59 +02:00
Adam Byrtek
bafc522f43 Use app_ctx instead of request_ctx to access the app 2016-08-19 21:20:59 +02:00
Adam Byrtek
0d833ce4ce Updates after code review 2016-08-19 21:19:33 +02:00
Adam Byrtek
3810a54343 Alternative solution for lack of response caching 2016-08-19 21:19:17 +02:00
Adam Byrtek
307a7f5758 Update the testing documentation 2016-08-19 21:19:17 +02:00
Adam Byrtek
6aaecb7d43 Remove redundant cache flag 2016-08-19 21:19:17 +02:00
Adam Byrtek
846db2412f Mixin for JSON decoding code shared between request/response 2016-08-19 21:19:17 +02:00
Adam Byrtek
8ec58b0f29 JSON response tests and first draft of code that passes 2016-08-19 21:14:12 +02:00
Adam Byrtek
6ebc333a23 Use proper exception type and update changelog 2016-08-19 21:14:12 +02:00
Adam Byrtek
fe022f9f59 Use content_type kwarg instead of manipulating headers 2016-08-19 21:13:33 +02:00
Adam Byrtek
a10dbf15fe JSON support for the Flask test client 2016-08-19 21:13:33 +02:00
Nate Prewitt
9608198047 adding in try around __import__ to catch invalid files/paths (#1950) 2016-08-12 15:12:00 +02:00
Auke Willem Oosterhoff
387add139b Use path of socket consistently accross document. (#1976)
* #1975 Use location of socket consistently accross document.
2016-08-03 09:22:14 -07:00
Jeff Widman
e5ea782c55 Remove unused Redbaron dependency (#1967) 2016-07-29 14:27:30 +02:00
ahmedakef
4800f05041 close <li> tag in lines (16,18) (#1951)
i noticed that <li> tag haven't closed in lines 15,18 
which is bad practice as if i put "some thing : <h1> some text </h1>" in the text-area  all the other articles become <h1> so big and color blue
2016-07-28 22:46:42 +02:00
Ioan Vancea
63f23fb591 Added a missing module to import statement 2016-07-28 16:34:48 +02:00
Armin Ronacher
49f659dcb6 Merge pull request #1956 from shakib609/master
Update allowed_file function in fileuploads.rst
2016-07-17 23:02:26 +05:00
Shakib Hossain
4151970cee Update allowed_file function in fileuploads.rst
Update allowed_file function to accept lowercase and uppercase file extensions
2016-07-16 21:59:44 +06:00
David Lord
b163f5a6a5 Merge branch '0.11-maintenance' 2016-07-06 08:02:46 -07:00
David Lord
21cb0923cb persona is discontinued, remove example
closes #1947
2016-07-06 08:02:13 -07:00
David Lord
675e5297ad Merge branch '0.11-maintenance' 2016-07-05 17:34:51 -07:00
Kyle Lawlor
d83d72b480 Address #1902: Converts example/flaskr to have a setup.py (#1945)
* Converts example/flaskr to have a setup.py

Makes the flaskr app easier to run, ex. workflow:
- pip install --editable .
- export FLASK_APP=flaskr.flaskr
- flask initdb
- flask run

Testing is also easier now:
- python setup.py test

* Fixed an import error in flaskr/tests

- the statement `import flaskr` caused errors in python3
- `from . import flaskr` fixes the issue in 2.7.11 and 3.5.1

* Better project structure and updates the docs

- Re-factors *flaskr*'s project structure a bit
- Updates docs to make sense with the new structure
  - Adds a new step about installing Flask apps with setuptools
  - Switches first-person style writing to second-person (reads better IMO)
  - Adds segments in *testing.rst* for running tests with setuptools

* Remove __init__.py from tests

- py.test recommends not using __init__.py

* Fix testing import errors
2016-07-05 17:30:59 -07:00
Hyunchel Kim
6179f41fd9 Enhance tests.test_cli.test_find_best_app (#1882)
This commit adds a test case for `test_find_best_app` where
Module object does not contain Flask application.
Also cleans the function little bit to provides more meaningful comment.
2016-07-05 12:46:01 -07:00
Olexander Yermakov
f5dc8b3880 Update installation documentation for using 'pip' command (#1920) 2016-07-05 12:00:43 -07:00
John Still
5218c31bf5 clarify blueprint 404 error handling in docs 2016-07-02 17:03:36 -05:00
Antoine Catton
d142584973 Add the ability to combine MethodViews 2016-06-28 17:35:39 +02:00
georgschoelly
7de93972bd fix docs: name of url_value_preprocessor method (#1932)
This typo got introduced in 5da1fc2215,
the original commit for the url_value_preprocessor decorator.
2016-06-26 13:32:47 -07:00
David Lord
d775103a03 clean up code formatting in some docs
fix warnings while building docs
2016-06-26 13:03:29 -07:00
Kiss György
eb6880c00a Added runner fixture 2016-06-25 13:24:43 +02:00
Kiss György
53444cfc8a Added tests, fixed some minor alignment problems. 2016-06-25 13:22:18 +02:00
Kiss György
9522f4f76c Added routes command, which shows all the endpoints registered for the app.
Orderable by rules, endpoints and methods. Shows up in the builtin command list.
2016-06-25 12:15:14 +02:00
David Lord
18a00020e5 re-add passthrough_errors to cli runner (#1928)
This got dropped during the cli simplification.  Re: #1679
2016-06-23 13:00:45 -07:00
David Lord
77cfb9b226 remove unnecessary form action attributes 2016-06-22 15:01:41 -07:00
David Lord
e924bd3458 Revert "wtforms: Add missing closing tags in example (#1917)"
This reverts commit 146cba53e7.
2016-06-22 14:53:27 -07:00
Ameya Pandilwar
9e52e05486 Update documentation for upgrading Flask using 'pip' command (#1918) 2016-06-22 13:26:35 -07:00
Sudheer Satyanarayana
a098a9a625 Fix small typo in python3 docs
Add missing 'be'
2016-06-21 17:27:03 +02:00
Baptiste Fontaine
8e8e111e42 wtforms: Add missing closing tags in example (#1917) 2016-06-19 13:27:23 -07:00