[damned-lies] Removed deprecated method



commit 3601bec1769ef977feb8b57d15a84b1dc2dd07a7
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Jan 16 10:06:56 2014 +0100

    Removed deprecated method

 stats/doap.py        |    2 +-
 stats/tests/tests.py |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/stats/doap.py b/stats/doap.py
index 4280ea7..13ac16f 100644
--- a/stats/doap.py
+++ b/stats/doap.py
@@ -12,7 +12,7 @@ class DoapParser(object):
         self.project_root = self.tree.getroot()
         if not self.project_root.tag.endswith("Project"):
             # Try to get Project from root children (root might be <rdf:RDF>)
-            for child in self.project_root.getchildren():
+            for child in self.project_root:
                 if child.tag.endswith("Project"):
                     self.project_root = child
                     break
diff --git a/stats/tests/tests.py b/stats/tests/tests.py
index 92051be..4c639d7 100644
--- a/stats/tests/tests.py
+++ b/stats/tests/tests.py
@@ -21,6 +21,7 @@ import os
 import shutil
 import tarfile
 from datetime import date
+from functools import wraps
 
 from django.test import TestCase
 from django.core import mail
@@ -36,6 +37,7 @@ from fixture_factory import *
 
 def test_scratchdir(test_func):
     """ Decorator to temporarily use the scratchdir inside the test directory """
+    @wraps(test_func)
     def decorator(self):
         old_SCRATCHDIR = settings.SCRATCHDIR
         old_POTDIR = settings.POTDIR


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]