Commit Graph
85 Commits
Author SHA1 Message Date
James Valleroy b00a634647 Update network tests, minor fixes to network.py.
Return UUID when adding a connection.
Have get_connection raise an exception instead of returning None.
2015-05-16 15:39:26 -04:00
fonfon 5cca1f99cf removed/skipped deprecated unit-test 2015-05-04 10:52:29 +02:00
fonfon 4561c3bcd9 Removed quote-checking functionality from pagekite
actions.py doesn't use shlex.quote anymore so I don't
have to check for accidentially quoted things anymore.
2015-05-03 19:27:12 +02:00
fonfon 7af92d9e65 Updated unit- and doctests 2015-05-03 19:27:12 +02:00
fonfon ef08f40447 minor layout cleanup 2015-05-03 15:28:45 +02:00
fonfon e0fa113a9c updated tests 2015-05-03 09:44:46 +02:00
fonfon 1fc0064fd0 refactoring pagekite: configuration form works
splitting the services to a separate page is not yet finished
2015-05-03 09:44:46 +02:00
Sunil Mohan Adapa b62f6746f4 Handle arguments to actions properly
- Don't allow strings to be sent as arguments.  The mixup with
  lists/tuples could be dangerous.

- Don't escape arguments.  subprocess.Popen takes care that arguments
  are passed on nicely to the actions.

- Update tests.
2015-05-01 18:52:17 +05:30
Sunil Mohan Adapa 13e0707b09 network: Skip network tests when running as non-root 2015-04-06 23:11:26 +05:30
Sunil Mohan Adapa f00f65f484 network: Update tests to work with UUIDs and add a few more checks 2015-04-06 22:21:29 +05:30
James Valleroy 2441caf647 Add AP and adhoc wifi modes, and shared IPv4 addressing mode. 2015-04-06 22:21:29 +05:30
James Valleroy 8d9b388375 Fix network tests, add form help and validator. 2015-04-06 22:21:29 +05:30
James Valleroy 9b201a2daf Rename network module to networks.
Move networkmanager helper functions into a new file.
Add some network tests.
2015-04-06 22:21:28 +05:30
Bob Girard c7a8bcbd17 Skip tests for now requiring Django configuration
Tests pass locally, but not in Travis-CI. Tests will
be re-enabled when Django configuration is added.
2015-04-01 23:07:12 -07:00
Bob Girard 41d6cae0a9 Enable integration of Plinth with Travis-CI
- Add files .travis.yml and requirements.txt
- In setup.py, remove 'pygobject' from install_requires
- In setup.py, add 'pyyaml' to install_requires
- Add file plinth/tests/coverage/__init__.py
- Rename file plinth/tests/coverage/test_coverage.py to coverage.py
- In plinth/tests/coverage/coverage.py, rename class TestCoverageCommand
  to CoverageCommand
2015-04-01 16:12:59 -07:00
Bob Girard 15161e10b1 Eliminate renaming plinth.config file for tests
- Instead of renaming plinth.config, make a copy and run all feasible
  tests on the copy, then delete the copy.
2015-02-13 11:33:35 -07:00
Sunil Mohan Adapa e69b500247 Add to context processor and menu test cases
- Minor style updates to other tests
2015-01-30 18:11:37 +05:30
Bob Girard f184c23c31 Add unit tests (#1)
* Add unit tests for cfg.py, context_processors.py, and menu.py
* Add new plinth/tests/data directory for miscellaneous test data
* In cfg.py, add an explicit check to verify the existence of the secondary
  (non-default) plinth.config file
* In cfg.py, replace deprecated configparser.SafeConfigParser with
  configparser.ConfigParser
2015-01-30 18:11:36 +05:30
Bob Girard c72c03890c Add detailed test coverage console report
* Add a detailed console report to the 'test_coverage' command output
* Expand the precision of all coverage percentages to two decimal places
* Print the location of the HTML coverage report at the end of the console report
2015-01-25 10:52:44 +05:30
fonfon ae83566653 removed unused 'title' from subsubmenus 2014-12-15 15:54:40 +01:00
Sunil Mohan Adapa 10496d89a5 Refactor templatetags and tests for styling 2014-12-14 08:51:13 +05:30
fonfon 97fe5714e2 Fix subsubmenu highlighting bug and add tests 2014-12-09 23:32:06 +01:00
Sunil Mohan Adapa 733a4fd139 Minor styling fixes for test coverage script 2014-12-07 11:39:38 +05:30
Sunil Mohan Adapa 5016087d5c Move coverage to test dependency and install it properly
- Coverage should only be required if running tests

- When running test_coverage command all the install dependencies and
  test dependencies should be installed.
2014-12-07 11:38:33 +05:30
Sunil Mohan Adapa a0cd525b96 Add explicit license from test coverage script
The license on the blog post is GPLv3+.  The derived work can't be of
any other license but GPLv3+.
2014-12-07 11:33:10 +05:30
Sunil Mohan Adapa 3444d5e314 Don't fail setup.py when without coverage module 2014-12-07 11:10:37 +05:30
fonfon ff36dd1010 print coverage at the end of the test; minor pep8 fixes 2014-12-07 10:40:51 +05:30
Bob Girard a502da63d5 Add test coverage measurement and reporting
- Implement coverage functionality as a setuptools Command subclass
  (in plinth/tests/coverage/test_coverage.py)
- Register the new 'test_coverage' command in setup.py
- Modify the INSTALL file to specify python3-coverage as a new dependency
- Modify the HACKING file to document the new 'test_coverage' command
- Have git (via .gitignore) ignore the '.coverage' output data file and
  the contents of the 'plinth/tests/coverage/report' directory
2014-12-06 18:14:42 +05:30
Sunil Mohan Adapa 5b969d9d30 Explicitly write license headers for each source file
The package license (AGPL3+) implicitly indicates the license of each
file.  However, it is desirable to have license headers in each file.
This is the case for many prominent projects like GNU project, Mozilla
etc.
2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa c9d8bb9d00 Require and use Python3 2014-10-01 11:31:51 +05:30
Sunil Mohan Adapa 4cc2dc4546 Launch test cases using "setup.py test" 2014-08-31 14:24:00 +05:30
Sunil Mohan Adapa e0816cd432 Update test cases for new directory structure 2014-08-30 09:33:53 +05:30
Sunil Mohan Adapa 709a540381 Rename test cases to have python standard name 2014-08-30 09:18:36 +05:30
Sunil Mohan Adapa 64b6a1294e Remove unused testdata directory 2014-08-30 09:17:21 +05:30
Sunil Mohan Adapa 65fa648d9f Reorganize python sources into 'plinth' package 2014-08-29 12:57:27 +05:30