[damned-lies] Add 'archive actions' option in all cases for committer
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Add 'archive actions' option in all cases for committer
- Date: Mon, 19 Sep 2011 09:06:41 +0000 (UTC)
commit 6721ea8edb6bcee394a9da10e7fb3dcc50227789
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Sep 19 11:06:14 2011 +0200
Add 'archive actions' option in all cases for committer
vertimus/models.py | 4 +---
vertimus/tests/__init__.py | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/vertimus/models.py b/vertimus/models.py
index d6b7be8..1cd2b10 100644
--- a/vertimus/models.py
+++ b/vertimus/models.py
@@ -92,9 +92,7 @@ class State(models.Model):
def _get_available_actions(self, person, action_names):
action_names.append('WC')
if person.is_committer(self.language.team) and 'IC' not in action_names:
- action_names.extend(('Separator', 'IC'))
- if self.name not in ('None', 'Committed'):
- action_names.append('AA')
+ action_names.extend(('Separator', 'IC', 'AA'))
return [eval('Action' + action_name)() for action_name in action_names]
def get_action_sequence_from_level(self, level):
diff --git a/vertimus/tests/__init__.py b/vertimus/tests/__init__.py
index b651245..d60f176 100644
--- a/vertimus/tests/__init__.py
+++ b/vertimus/tests/__init__.py
@@ -78,7 +78,7 @@ class VertimusTest(TeamsAndRolesTests):
for p in (self.pc, self.pcoo):
action_names = [a.name for a in state.get_available_actions(p)]
- self.assertEqual(action_names, ['RT', 'WC', None, 'IC'])
+ self.assertEqual(action_names, ['RT', 'WC', None, 'IC', 'AA'])
def test_state_translating(self):
state = StateTranslating(branch=self.b, domain=self.d, language=self.l, person=self.pt)
@@ -187,7 +187,7 @@ class VertimusTest(TeamsAndRolesTests):
for p in (self.pc, self.pcoo):
action_names = [a.name for a in state.get_available_actions(p)]
- self.assertEqual(action_names, ['AA', 'WC', None, 'IC'])
+ self.assertEqual(action_names, ['AA', 'WC', None, 'IC', 'AA'])
def test_action_wc(self):
state = StateNone(branch=self.b, domain=self.d, language=self.l)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]