Skip to content

Commit

Permalink
organisation: update templates and tests for many themes in working g…
Browse files Browse the repository at this point in the history
…roups

Since themes are now in a many to many relationship with working
groups that must be reflected in both templates and tests.
  • Loading branch information
Tryggvi Bjorgvinsson committed Apr 14, 2014
1 parent eae7e2a commit 202eb3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ <h2>{{ object.name }}</h2>
<div class="main col-md-9 col-md-push-3">
{{ object.description|markdown }}
<div class="row">
{% if object.workinggroup_set.all %}
{% if object.workinggroups.all %}
<div class="col-md-6 col-sm-12">
<h3>Working Groups</h3>
{% for group in object.workinggroup_set.all %}
{% for group in object.workinggroups.all %}
<h4>
<a href="{{ group.homepage_url }}" target="_blank">
{{ group.name }}
Expand Down
16 changes: 7 additions & 9 deletions foundation/organisation/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,16 @@ def setUp(self): # flake8: noqa
name='Kernel people',
slug='kernel-people',
description='Linus disciples',
homepage_url='http://kernel.org',
theme=self.hats)
homepage_url='http://kernel.org')
self.kernel.themes.add(self.hats)

self.i18n = WorkingGroup.objects.create(
name='Internationalisation',
slug='i18n',
description='I prefer my own language thank you',
homepage_url='https://fedoraproject.org/wiki/I18N',
theme=self.hats,
incubation=True)
self.i18n.themes.add(self.hats)

self.beefy = Project.objects.create(
name='Beefy Miracle',
Expand Down Expand Up @@ -357,18 +357,16 @@ def setUp(self): # flake8: noqa
slug='csv-on-the-web',
description='Definition of a vocabulary for describing tables',
homepage_url='http://www.w3.org/2013/csvw/',
theme=self.theme,
incubation=False
)
incubation=False)
self.csv.themes.add(self.theme)

self.government = WorkingGroup.objects.create(
name='Government Linked Data',
slug='government-linked-data',
description='Help governments around the world publish their data',
homepage_url='http://www.w3.org/2011/gld/',
theme=self.theme,
incubation=True
)
incubation=True)
self.government.themes.add(self.theme)

def test_workinggroup_list(self):
response = self.app.get(reverse('working-groups'))
Expand Down

0 comments on commit 202eb3a

Please sign in to comment.