Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 4
0
 def test_regular_dm(self):
     self.ctx.prefix = '?'
     expected = '?'
     got = utils.clean_prefix(self.ctx)
     self.assertMultiLineEqual(expected, got)
Exemplo n.º 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
Exemplo n.º 6
0
 def test_regular_guild(self, ctx):
     ctx.guild = True
     ctx.prefix = '?'
     expected = '?'
     got = clean_prefix(ctx)
     assert expected == got
Exemplo n.º 7
0
 def test_regular_dm(self, ctx):
     ctx.prefix = '?'
     expected = '?'
     got = clean_prefix(ctx)
     assert expected == got