def test_total_length_all(self): embed = embeds.Embed(title="title", description="description") embed.set_author(name="author name") embed.set_footer(text="footer text") embed.add_field(name="field name 1", value="field value 2") embed.add_field(name="field name 3", value="field value 4") assert embed.total_length() == 88
def test_total_length_field_value(self): embed = embeds.Embed().add_field(name="", value="field value") assert embed.total_length() == 11
def test_total_length_footer_text(self): embed = embeds.Embed().set_footer(text="footer text") assert embed.total_length() == 11
def test_total_length_author_name(self): embed = embeds.Embed().set_author(name="author name") assert embed.total_length() == 11
def test_total_length_description(self): embed = embeds.Embed(description="description") assert embed.total_length() == 11
def test_total_length_when_description_is_none(self): embed = embeds.Embed(description=None) assert embed.total_length() == 0
def test_total_length_title(self): embed = embeds.Embed(title="title") assert embed.total_length() == 5
def test_total_length_when_title_is_none(self): embed = embeds.Embed(title=None) assert embed.total_length() == 0
def test_total_length_when_embed_is_empty(self): embed = embeds.Embed() assert embed.total_length() == 0