Skip to content

Commit

Permalink
Change unittest deduplicate() to not expect a DescriptorWarning.
Browse files Browse the repository at this point in the history
  • Loading branch information
isislovecruft committed Mar 21, 2015
1 parent a27d790 commit ed27df5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/bridgedb/test/test_parse_descriptors.py
Expand Up @@ -370,13 +370,14 @@ def test_parse_descriptors_parseExtraInfoFiles_one_file(self):

def test_parse_descriptors_deduplicate_identical_timestamps(self):
"""Parsing two descriptors for the same bridge with identical
timestamps should raise a ``b.p.descriptors.DescriptorWarning``.
timestamps should log a ``b.p.descriptors.DescriptorWarning``
and retain only one copy of the descriptor.
"""
descFileOne = io.BytesIO(BRIDGE_EXTRA_INFO_DESCRIPTOR)
descFileTwo = io.BytesIO(BRIDGE_EXTRA_INFO_DESCRIPTOR)
self.assertRaises(descriptors.DescriptorWarning,
descriptors.parseExtraInfoFiles,
descFileOne, descFileTwo)
routers = descriptors.parseExtraInfoFiles(descFileOne, descFileTwo)

self.assertEqual(len(routers), 1)

def test_parse_descriptors_parseExtraInfoFiles_two_files(self):
"""Test for ``b.p.descriptors.parseExtraInfoFiles`` with two
Expand Down

0 comments on commit ed27df5

Please sign in to comment.