Merge lp://staging/~jkakar/todo/login-command into lp://staging/todo
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~jkakar/todo/login-command |
Merge into: | lp://staging/todo |
Prerequisite: | lp://staging/~jkakar/todo/project-skeleton |
Diff against target: |
644 lines (+571/-1) 11 files modified
todo/application.py (+41/-0) todo/commands.py (+57/-0) todo/entry_point.py (+3/-1) todo/model.py (+57/-0) todo/testing/__init__.py (+15/-0) todo/testing/basic.py (+27/-0) todo/testing/doubles.py (+87/-0) todo/tests/__init__.py (+15/-0) todo/tests/test_application.py (+62/-0) todo/tests/test_commands.py (+126/-0) todo/tests/test_model.py (+81/-0) |
To merge this branch: | bzr merge lp://staging/~jkakar/todo/login-command |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Todo Team | Pending | ||
Review via email: mp+47195@code.staging.launchpad.net |
Description of the change
This branch introduces the following changes:
- A bunch of testing support has been added in a new todo.testing
package. There's a TodoTestCase with support for using test
resources and for testing Twisted-based code. There's a also a
todo.doubles module with a FakeEndpoint that can be used to write
tests for code that use txFluidDB. The MockEndpoint in txFluidDB
itself isn't useful, unfortunately, because it only allows one
response to be mocked at a time. At some point soon we'll need more
than that.
- A new todo.application module contains helper functions to get the
default path for configuration data and to create the default
endpoint.
- A new todo.model module contains the beginnings of a model layer.
So far it has a login function and an empty Person class (which I
expect to eventually expose methods like 'create_task',
'create_
- A new todo.commands module contains a new 'login' command. It uses
the model layer to perform actual authentication and takes care of
writing credentials to disk (which I guess is specific to the CLI
interface).
Hopefully subsequent branches will be a bit easier to push forward,
now that testing support is in place. The 'login' command doesn't
create a namespace for tasks yet. I decided to defer that to a
subsequent branch, since this one is already getting a bit big.
Unmerged revisions
- 19. By Jamu Kakar
-
- Fixed typo in test.
- 18. By Jamu Kakar
-
- Fixed type in program name.
- 17. By Jamu Kakar
-
- Added a todo.commands module with a 'login' command that
authenticates a user against FluidDB and writes credentials to disk. - 16. By Jamu Kakar
-
- Add a new todo.model module with a login function and the beginnings
of a Person model class. - 15. By Jamu Kakar
-
- A new todo.testing.
doubles module contains a FakeEndpoint (and
FakeRequest) that can be used to test code that uses txFluidDB. - 14. By Jamu Kakar
-
- Updated TodoTestCase to work for Twisted-based code.
- 13. By Jamu Kakar
-
- Added a new todo.application module with functions to get the
configuration path and create a default txfluiddb.client. Endpoint. - 12. By Jamu Kakar
-
- Added todo.tests package.
- 11. By Jamu Kakar
-
- Add a new todo.testing package to contain support for the test
suite. A TodoTestCase combines the testresources and testtools test
case classes. - 10. By Jamu Kakar
-
- Added 'commandant' to the requires list in setup.py.
Just had a thought, which I'll record here so I don't forget it:
It'd be nice to add a test to ensure that cached credentials are
completely rewritten when the 'login' command is run more than once.