commit da8bdbe56e5cdb6d7e6798e8248681147b19ae9d Author: Isis Lovecruft isis@torproject.org Date: Sun Dec 28 12:41:02 2014 +0000
Add two more unittests for update() method of bridges.Flags class. --- lib/bridgedb/test/test_bridges.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/bridgedb/test/test_bridges.py b/lib/bridgedb/test/test_bridges.py index 86b60bf..649bca3 100644 --- a/lib/bridgedb/test/test_bridges.py +++ b/lib/bridgedb/test/test_bridges.py @@ -398,12 +398,24 @@ class FlagsTests(unittest.TestCase): self.flags.valid = False self.assertFalse(self.flags.valid, "The Valid flag should be False")
- def test_update(self): + def test_update_Fast_Stable(self): """Test changing flags with the update() method.""" self.flags.update(["Fast", "Stable"]) self.assertTrue(self.flags.fast) self.assertTrue(self.flags.stable)
+ def test_update_Fast(self): + """Test changing flags with the update() method.""" + self.flags.update(["Fast"]) + self.assertTrue(self.flags.fast) + self.assertFalse(self.flags.stable) + + def test_update_Stable(self): + """Test changing flags with the update() method.""" + self.flags.update(["Stable"]) + self.assertFalse(self.flags.fast) + self.assertTrue(self.flags.stable) +
class PluggableTransportTests(unittest.TestCase): """Tests for :class:`bridgedb.bridges.PluggableTransport."""
tor-commits@lists.torproject.org