浏览代码

Modifications des tests unitaires en fct du refacto

pull/5/head
Figg 9 个月前
父节点
当前提交
f08f96b74b
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 1
    1
      test/TestCase.py
  2. 5
    4
      test/model/message_test.py

+ 1
- 1
test/TestCase.py 查看文件

@@ -6,4 +6,4 @@ from million.model.message import Message
6 6
 
7 7
 class TestCase(unittest.TestCase):
8 8
     def _message_with_text(self, text: str):
9
-        return Message(content=text, sender_name="test", timestamp_ms=0)
9
+        return Message(content=text, sender_name="test", timestamp_ms=0, is_geoblocked_for_viewer=True)

+ 5
- 4
test/model/message_test.py 查看文件

@@ -1,6 +1,7 @@
1 1
 
2 2
 
3 3
 from million.model.message import Message
4
+import million.analyze.message_evaluation as msg_val
4 5
 from test.TestCase import TestCase
5 6
 
6 7
 
@@ -9,19 +10,19 @@ class MessageTest(TestCase):
9 10
     def test_message_nominal(self, overrides=None, exclude=None):
10 11
         message = self._message_with_text("1")
11 12
 
12
-        assert 1 == message.get_counted_value()
13
+        assert 1 == msg_val.get(message)
13 14
 
14 15
     def test_message_with_text(self, overrides=None, exclude=None):
15 16
         message = self._message_with_text("1 text")
16 17
 
17
-        assert 1 == message.get_counted_value()
18
+        assert 1 == msg_val.get(message)
18 19
 
19 20
     def test_message_floored_dot(self, overrides=None, exclude=None):
20 21
         message = self._message_with_text("1.5")
21 22
 
22
-        assert 1 == message.get_counted_value()
23
+        assert 1 == msg_val.get(message)
23 24
 
24 25
     def test_message_floored_comma(self, overrides=None, exclude=None):
25 26
         message = self._message_with_text("1,5")
26 27
 
27
-        assert 1 == message.get_counted_value()
28
+        assert 1 == msg_val.get(message)

正在加载...
取消
保存