Example #1
0
 def test_permissions_string__with_additional_permissions(self):
     assert "-all,+d" == permissions_string(["d"], set())
     assert "-all,-a,-b,-c,+d" == permissions_string(["d"],
                                                     self.PERMISSIONS)
Example #2
0
 def test_permissions_string__empty_list(self):
     assert "-all" == permissions_string([], set())
     assert "-all,-a,-b,-c" == permissions_string([], self.PERMISSIONS)
Example #3
0
 def test_permissions_string__none(self):
     assert "+all" == permissions_string(None, set())
     assert "+all" == permissions_string(None, self.PERMISSIONS)
Example #4
0
 def test_permissions_string__all_explicit(self):
     assert '-all,+b,+a,+c' == permissions_string(['b', 'a', 'c'],
                                                  self.PERMISSIONS)
Example #5
0
 def test_permissions_string__all_explicit(self):
     assert "-all,+b,+a,+c" == permissions_string(["b", "a", "c"],
                                                  self.PERMISSIONS)
Example #6
0
 def test_permissions_string__with_additional_permissions(self):
     assert '-all,+d' == permissions_string(['d'], set())
     assert '-all,-a,-b,-c,+d' == permissions_string(['d'],
                                                     self.PERMISSIONS)
Example #7
0
 def test_permissions_string__none(self):
     assert '+all' == permissions_string(None, set())
     assert '+all' == permissions_string(None, self.PERMISSIONS)
Example #8
0
 def test_permissions_string__empty_list(self):
     assert '-all' == permissions_string([], set())
     assert '-all,-a,-b,-c' == permissions_string([], self.PERMISSIONS)
Example #9
0
 def test_permissions_string__all_explicit(self):
     assert '-all,+b,+a,+c' == permissions_string(['b', 'a', 'c'],
                                                  self.PERMISSIONS)
Example #10
0
 def test_permissions_string__all_explicit(self):
     assert "-all,+b,+a,+c" == permissions_string(
         ["b", "a", "c"], self.PERMISSIONS
     )