Unit test for TranslationBranchApprover not very easy to understand

Bug #348375 reported by Henning Eggers
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Henning Eggers

Bug Description

The unit test TestTranslationBranchApprover is very hard to read for thos not familiar with it. One main cause for that are the helper funtions _upload_template and _upload_second_template that do much more than their names suggest, depending on certain conditions.

These methods should be split up so that the steps to set up each individual test method become clearer. For example, the reader of test_replace_existing_approved should understand the following setup steps by reading the code:

1. A potemplate entry is created in the database with domain A and path YB
2. An upload is simulated by putting a file with path C into the import queue.
3. The approver is created with path D as its parameter.

Changed in rosetta:
importance: Undecided → Medium
status: New → Triaged
tags: added: cleanup
Revision history for this message
Henning Eggers (henninge) wrote :

Fixing this while implementing "import translatoins from branches".

Changed in rosetta:
assignee: nobody → henninge
status: Triaged → In Progress
Changed in rosetta:
milestone: none → 2.2.4
Revision history for this message
Henning Eggers (henninge) wrote :

Fixed in devel 8197.

Changed in rosetta:
status: In Progress → Fix Committed
Changed in rosetta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.