예제 #1
0
 def test_regular_guild_nick(self):
     self.ctx.guild = True
     self.ctx.me.nick = 'Test nick'
     self.ctx.prefix = '?'
     expected = '?'
     got = utils.clean_prefix(self.ctx)
     self.assertMultiLineEqual(expected, got)
예제 #2
0
 def test_mention_guild_nick(self):
     self.ctx.guild = True
     self.ctx.me.nick = 'Test nick'
     self.ctx.prefix = self.ctx.me.mention
     expected = '@{}'.format(self.ctx.me.nick)
     got = utils.clean_prefix(self.ctx)
     self.assertMultiLineEqual(expected, got)
예제 #3
0
 def test_mention_dm(self):
     self.ctx.prefix = self.ctx.me.mention
     expected = '@{}'.format(self.ctx.me.name)
     got = utils.clean_prefix(self.ctx)
     self.assertMultiLineEqual(expected, got)
예제 #4
0
 def test_regular_dm(self):
     self.ctx.prefix = '?'
     expected = '?'
     got = utils.clean_prefix(self.ctx)
     self.assertMultiLineEqual(expected, got)
예제 #5
0
 def test_mention_guild(self, ctx):
     ctx.guild = True
     ctx.prefix = ctx.me.mention
     expected = f'@{ctx.me.display_name}'
     got = clean_prefix(ctx)
     assert expected == got
예제 #6
0
 def test_regular_guild(self, ctx):
     ctx.guild = True
     ctx.prefix = '?'
     expected = '?'
     got = clean_prefix(ctx)
     assert expected == got
예제 #7
0
 def test_regular_dm(self, ctx):
     ctx.prefix = '?'
     expected = '?'
     got = clean_prefix(ctx)
     assert expected == got