From eea3c66133760723d96f64ebf700a5520c283376 Mon Sep 17 00:00:00 2001
From: Michael Merickel <michael@merickel.org>
Date: Fri, 09 Jun 2017 06:59:44 +0200
Subject: [PATCH] Merge pull request #3076 from Pylons/3073-all_permissions_list-iterability-1.8

---
 pyramid/tests/test_security.py |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/pyramid/tests/test_security.py b/pyramid/tests/test_security.py
index 6d75ac8..5561a05 100644
--- a/pyramid/tests/test_security.py
+++ b/pyramid/tests/test_security.py
@@ -16,12 +16,32 @@
     def _makeOne(self):
         return self._getTargetClass()()
 
-    def test_it(self):
+    def test_equality_w_self(self):
         thing = self._makeOne()
         self.assertTrue(thing.__eq__(thing))
-        self.assertEqual(thing.__iter__(), ())
+
+    def test_equality_w_other_instances_of_class(self):
+        thing = self._makeOne()
+        other = self._makeOne()
+        self.assertTrue(thing.__eq__(other))
+
+    def test_equality_miss(self):
+        thing = self._makeOne()
+        other = object()
+        self.assertFalse(thing.__eq__(other))
+
+    def test_contains_w_string(self):
+        thing = self._makeOne()
         self.assertTrue('anything' in thing)
 
+    def test_contains_w_object(self):
+        thing = self._makeOne()
+        self.assertTrue(object() in thing)
+
+    def test_iterable(self):
+        thing = self._makeOne()
+        self.assertEqual(list(thing), [])
+
     def test_singleton(self):
         from pyramid.security import ALL_PERMISSIONS
         self.assertEqual(ALL_PERMISSIONS.__class__, self._getTargetClass())

--
Gitblit v1.9.3