Esempio n. 1
0
 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
Esempio n. 2
0
 def test_total_length_field_value(self):
     embed = embeds.Embed().add_field(name="", value="field value")
     assert embed.total_length() == 11
Esempio n. 3
0
 def test_total_length_footer_text(self):
     embed = embeds.Embed().set_footer(text="footer text")
     assert embed.total_length() == 11
Esempio n. 4
0
 def test_total_length_author_name(self):
     embed = embeds.Embed().set_author(name="author name")
     assert embed.total_length() == 11
Esempio n. 5
0
 def test_total_length_description(self):
     embed = embeds.Embed(description="description")
     assert embed.total_length() == 11
Esempio n. 6
0
 def test_total_length_when_description_is_none(self):
     embed = embeds.Embed(description=None)
     assert embed.total_length() == 0
Esempio n. 7
0
 def test_total_length_title(self):
     embed = embeds.Embed(title="title")
     assert embed.total_length() == 5
Esempio n. 8
0
 def test_total_length_when_title_is_none(self):
     embed = embeds.Embed(title=None)
     assert embed.total_length() == 0
Esempio n. 9
0
 def test_total_length_when_embed_is_empty(self):
     embed = embeds.Embed()
     assert embed.total_length() == 0