Needs work
Project:
Project
Version:
6.x-1.x-dev
Component:
Tests
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2010 at 23:10 UTC
Updated:
21 Apr 2010 at 17:02 UTC
Jump to comment: Most recent file
Counterpart to #774844: Consider moving some setup logic from pift.test into project.test.
boombatower has written a number of tests for PIFT and this is an attempt to move some of the code there into project module.
This sets up taxonomy terms for the project and fixes the createProject method to return a more useful value (the created node).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | project_pift-5.patch | 546 bytes | mikey_p |
| #2 | project-tests-pift-2.patch | 8.14 KB | mikey_p |
| project-tests-pift-0.patch | 9.65 KB | mikey_p |
Comments
Comment #1
dwwGreat start for this, yay.
A) I think it makes sense for this base class *not* to have PIFT-specific stuff (since that's really a special case) and left pift.test have a class that derives from this which adds its own PIFT-specific stuff, e.g. this block:
p.s. even in pift.test, this variable should probably be called $pift_settings if that's what it is. ;)
B) I'm a bit hesitant to write tests with cvs.module involved, since it's *just* about to die and be replaced. Seems like extra effort we should avoid if at all possible.
C) This sounds like a bug we should fix in a new issue, not something to hack-around in this patch:
D) Wow, really, this is the only way to add a vocab from inside a test?
Alas...
E) s/dumy/dummy/
F) s/proeject/project/
Comment #2
mikey_p commentedThis addresses ABCDEF, but still doesn't seem to handle creating the project releases properly. This still fixes up createIssue to return the node object as well.
Comment #3
mikey_p commentedI'm tired.
Comment #4
dwwCommitted to HEAD. Yay, thanks!!!
Comment #5
mikey_p commentedThis seems to be causing some errors when running tests, since ProjectDrupalOrgWebTestCase doesn't have any tests method, but does have an info method.
Comment #6
dwwI'd rather have a test method in that class if that's what we need. ;)