changeThreadColor now works with MESSENGER_BLUE again

This commit is contained in:
Mads Marquart
2018-06-05 12:55:03 +02:00
parent 47679d1d3b
commit a4dfe0d279
2 changed files with 3 additions and 9 deletions

View File

@@ -1138,7 +1138,7 @@ class Client(object):
thread_id, thread_type = self._getThread(thread_id, None)
data = {
'color_choice': color.value,
'color_choice': color.value if color != ThreadColor.MESSENGER_BLUE else '',
'thread_or_other_fbid': thread_id
}

View File

@@ -75,19 +75,13 @@ def test_change_emoji_invalid(client, emoji):
@pytest.mark.parametrize(
"color",
[
pytest.mark.xfail(
x, reason="Apparently changing ThreadColor.MESSENGER_BLUE is broken"
)
if x == ThreadColor.MESSENGER_BLUE
else x
if x == ThreadColor.PUMPKIN
x
if x in [ThreadColor.MESSENGER_BLUE, ThreadColor.PUMPKIN]
else pytest.mark.expensive(x)
for x in ThreadColor
],
)
def test_change_color(client, catch_event, compare, color):
if color == ThreadColor.MESSENGER_BLUE:
pytest.xfail(reason="Apparently changing ThreadColor.MESSENGER_BLUE is broken")
with catch_event("onColorChange") as x:
client.changeThreadColor(color)
assert compare(x, new_color=color)