- Change Summary:
-
Just adding a note about admin_urls.py.
- Description:
-
This is not yet complete - putting this up as a sneak preview to show what I'm up to.
I'm using Mock here (http://pypi.python.org/pypi/mock/0.6.0), so you'll need to install it with easy_install to run
these tests. I've also removed the manager argument in the ExtensionInfo constructor, since the manager is assigned to an Extension automatically by ExtensionManager (extensions/base.py line 333).
Open to all suggestions / criticisms / feedback.
+ + Note: not sure why it's not included in this diff, but I've also added a test/ folder to extensions, with admin_urls.py and init.py. This lets ExtensionTest pass.
Adding Extension tests to Djblets
Review Request #1687 — Created June 27, 2010 and submitted
This is the first set of tests for the extension framework classes. There'll be more, don't worry. I'm using Mock here (http://pypi.python.org/pypi/mock/0.6.0), so you'll need to install it with easy_install to run these tests. I've also removed the manager argument in the ExtensionInfo constructor, since the manager is assigned to an Extension automatically by ExtensionManager (extensions/base.py line 333). Open to all suggestions / criticisms / feedback. Note: not sure why it's not included in this diff, but I've also added a test/ folder to extensions, with admin_urls.py and __init__.py. This lets ExtensionTest pass.
All Djblets tests pass.
-
-
This should be one big group. It's the "third party modules" section, and should also be in alphabetical order.
-
Dictionaries declared inline with multiple keys should have one key per row, with no keys on the row defining the dict.
-
I'm trying to move us away from camelCase for the unit test function names. Can you switch these to using underscores?
-
It'd be nice to put something in these to indicate that it's the Extension's Settings constructor, as it'll otherwise be less clear when looking at a bunch of unit tests from all over the codebase.
-
-
-
Here too. Any where where there's a comment immediately followed by code. There should always be a blank line between them.
-
-
-
-
-
-
-
And here. Any time there's a block (if statement, for loop, etc.) immediately following code, there should be a blank line between the code and the block.
-
-
I'd prefer something like: self.blahblah = Mock( return_value=[ '%s: %s' % (key, value) for key, value in blahblah ])
- Change Summary:
-
Fixed style and doc issues after ChipX86 review.
- Description:
-
~ This is not yet complete - putting this up as a sneak preview to show what I'm up to.
~ This is the first set of tests for the extension framework classes. There'll be more, don't worry.
I'm using Mock here (http://pypi.python.org/pypi/mock/0.6.0), so you'll need to install it with easy_install to run
these tests. I've also removed the manager argument in the ExtensionInfo constructor, since the manager is assigned to an Extension automatically by ExtensionManager (extensions/base.py line 333).
Open to all suggestions / criticisms / feedback.
Note: not sure why it's not included in this diff, but I've also added a test/ folder to extensions, with admin_urls.py and init.py. This lets ExtensionTest pass.