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