Commits

Andreas Loupasakis committed 68107b2

Fixed broken test in timeline app.

Comments (0)

Files changed (2)

transifex/addons/suggestions/views.py

 
 from authority.views import permission_denied
 
-# FIXME: Permission checking
 # Restrict access only for private projects since this is used to fetch stuff
 # Allow even anonymous access on public projects
 def entity_suggestions_snippet(request, entity_id, lang_code):

transifex/addons/timeline/tests.py

 
         # Sanity checks
         self.assertTrue( Project.objects.count() >= 1, msg = "Base test case didn't create any projects" )
-        project = Project.objects.all()[0]
 
         # Generate timeline URLs
         self.url_user_timeline = reverse("user_timeline")
         self.url_user_profile = reverse("profile_overview")
-        self.url_project_timeline = reverse('project_timeline', args=[project.slug])
-        self.url_project_detail = reverse('project_detail', args=[project.slug])
+        self.url_project_timeline = reverse('project_timeline', args=[self.project.slug])
+        self.url_project_detail = reverse('project_detail', args=[self.project.slug])
 
 
     def test_anon(self):