summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Finney <ben+debian@benfinney.id.au>2008-08-08 10:27:33 +1000
committerBen Finney <ben+debian@benfinney.id.au>2008-08-08 10:27:33 +1000
commit75676866d4bf394b3ba1ddef06e0c93f6da03242 (patch)
tree7c28bf07c3500001e632d3859ef3b3853bc5fe4f /tests
parent7b14352c54b7acbf2a68240fa960e188c6e8742a (diff)
downloadpython-apt-75676866d4bf394b3ba1ddef06e0c93f6da03242.tar.gz
'mapping.has_key' is deprecated, use current Python 'key in mapping' idiom.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_aptsources.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py
index 3e2f7ac5..9f439899 100644
--- a/tests/test_aptsources.py
+++ b/tests/test_aptsources.py
@@ -104,7 +104,7 @@ class TestAptSources(unittest.TestCase):
"edgy" in entry.dist):
for c in entry.comps:
if c == comp:
- if not found.has_key(entry.dist):
+ if entry.dist not in found:
found[entry.dist] = 0
found[entry.dist] += 1
#print "".join([s.str() for s in sources])
@@ -121,7 +121,7 @@ class TestAptSources(unittest.TestCase):
entry.template.name == "edgy"):
for c in entry.comps:
if c == comp:
- if not found.has_key(entry.dist):
+ if entry.dist not in found:
found[entry.dist] = 0
found[entry.dist] += 1
#print "".join([s.str() for s in sources])