Skip to content

Commit

Permalink
oragono-specific test for unregistered lusers counts
Browse files Browse the repository at this point in the history
  • Loading branch information
slingamn committed Oct 21, 2020
1 parent 215ed31 commit d48cbc4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions irctest/server_tests/test_lusers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ class LusersUnregisteredTestCase(LusersTestCase):

@cases.SpecificationSelector.requiredBySpecification('RFC2812')
def testLusers(self):
self.doLusersTest()

def doLusersTest(self):
self.connectClient('bar', name='bar')
lusers = self.getLusers('bar')
self.assertEqual(lusers.Unregistered, 0)
Expand Down Expand Up @@ -180,6 +183,27 @@ def testLusers(self):
self.assertEqual(lusers.LocalMax, 2)


class LusersUnregisteredDefaultInvisibleTest(LusersUnregisteredTestCase):
"""Same as above but with +i as the default."""

def customizedConfig(self):
conf = self.controller.baseConfig()
conf['accounts']['default-user-modes'] = '+i'
return conf

@cases.SpecificationSelector.requiredBySpecification('Oragono')
def testLusers(self):
self.doLusersTest()
lusers = self.getLusers('bar')
self.assertEqual(lusers.Unregistered, 0)
self.assertEqual(lusers.GlobalTotal, 2)
self.assertEqual(lusers.GlobalMax, 2)
self.assertEqual(lusers.GlobalInvisible, 2)
self.assertEqual(lusers.GlobalVisible, 0)
self.assertEqual(lusers.LocalTotal, 2)
self.assertEqual(lusers.LocalMax, 2)


class LuserOpersTest(LusersTestCase):

@cases.SpecificationSelector.requiredBySpecification('Oragono')
Expand Down

0 comments on commit d48cbc4

Please sign in to comment.