Skip to content

Commit e8d8ce1

Browse files
authored
Fix test failure (#1968)
1 parent bfb5023 commit e8d8ce1

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
11
from bill_on_document_created import (
2-
category_by_topic,
2+
CATEGORY_BY_TOPIC,
33
get_categories_from_topics,
44
TopicAndCategory,
55
)
66
from collections import deque
77

88

99
def test_get_categories_from_topics_empty():
10-
topic_to_category = category_by_topic()
10+
topic_to_category = CATEGORY_BY_TOPIC
1111
tags = []
1212
topic_and_categories = get_categories_from_topics(tags, topic_to_category)
13-
assert topic_and_categories == deque([])
13+
assert topic_and_categories == []
1414

1515

1616
def test_get_categories_from_topics_non_existant():
17-
topic_to_category = category_by_topic()
17+
topic_to_category = CATEGORY_BY_TOPIC
1818
tags = ["This shouldn't be a category"]
1919
topic_and_categories = get_categories_from_topics(tags, topic_to_category)
20-
assert topic_and_categories == deque([])
20+
assert topic_and_categories == []
2121

2222

2323
def test_get_categories_from_topics_works():
24-
topic_to_category = category_by_topic()
24+
topic_to_category = CATEGORY_BY_TOPIC
2525
tags = [
2626
"Banking and financial institutions regulation",
2727
"Soil pollution",
2828
]
2929
topic_and_categories = get_categories_from_topics(tags, topic_to_category)
30-
assert topic_and_categories == deque(
31-
[
32-
TopicAndCategory(
33-
topic="Banking and financial institutions regulation",
34-
category="Commerce",
35-
),
36-
TopicAndCategory(
37-
topic="Soil pollution", category="Environmental Protection"
38-
),
39-
]
40-
)
30+
assert topic_and_categories == [
31+
TopicAndCategory(
32+
topic="Banking and financial institutions regulation",
33+
category="Commerce",
34+
),
35+
TopicAndCategory(topic="Soil pollution", category="Environmental Protection"),
36+
]

0 commit comments

Comments
 (0)