Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
do not use [E] in Elvanto imported groups - use (E)
Browse files Browse the repository at this point in the history
  • Loading branch information
monty5811 committed Sep 14, 2016
1 parent 4a5a0c6 commit 0d214b6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file.
- Remove frontend data caching
- Improve error messages when ajax call fails

## Fixed
- Do not use [E] in Elvanto imported groups - use (E)

## [v1.12.1]
- Pin Django version

Expand Down
4 changes: 2 additions & 2 deletions elvanto/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def apostello_group_name(self):
"""
Name of internal group.
Just preprend an [E] before the group name.
Just preprend an (E) before the group name.
"""
return '[E] {0}'.format(self.name)
return '(E) {0}'.format(self.name)

def __str__(self):
"""Pretty representation."""
Expand Down
10 changes: 5 additions & 5 deletions scripts/demo_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@
"pk": 1,
"fields": {
"is_archived": false,
"name": "[E] Geneva",
"name": "(E) Geneva",
"description": "Imported from Elvanto"
}
}, {
"model": "apostello.recipientgroup",
"pk": 2,
"fields": {
"is_archived": false,
"name": "[E] England",
"name": "(E) England",
"description": "Imported from Elvanto"
}
}, {
"model": "apostello.recipientgroup",
"pk": 3,
"fields": {
"is_archived": false,
"name": "[E] Scotland",
"name": "(E) Scotland",
"description": "Imported from Elvanto"
}
}, {
"model": "apostello.recipientgroup",
"pk": 4,
"fields": {
"is_archived": false,
"name": "[E] Empty",
"name": "(E) Empty",
"description": "Imported from Elvanto"
}
}, {
"model": "apostello.recipientgroup",
"pk": 5,
"fields": {
"is_archived": false,
"name": "[E] All",
"name": "(E) All",
"description": "Imported from Elvanto"
}
}, {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_elvanto.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_pull_elvanto_group(self):
elv_models.ElvantoGroup.fetch_all_groups()
e_group = elv_models.ElvantoGroup.objects.get(name='England')
e_group.pull()
a_group = ap_models.RecipientGroup.objects.get(name='[E] England')
a_group = ap_models.RecipientGroup.objects.get(name='(E) England')
assert 'John Owen' in a_group.all_recipients_names
assert str(a_group.recipient_set.all()[0]) == 'John Owen'
assert str(a_group.recipient_set.all()[0].number) == '+447902546589'
Expand All @@ -116,7 +116,7 @@ def test_pull_all_groups(self):
elv_models.ElvantoGroup.pull_all_groups()
e_group = elv_models.ElvantoGroup.objects.get(name='England')
e_group.pull()
a_group = ap_models.RecipientGroup.objects.get(name='[E] England')
a_group = ap_models.RecipientGroup.objects.get(name='(E) England')
assert 'John Owen' in a_group.all_recipients_names
assert str(a_group.recipient_set.all()[0]) == 'John Owen'
assert str(a_group.recipient_set.all()[0].number) == '+447902546589'
Expand Down

0 comments on commit 0d214b6

Please sign in to comment.