Browse Source

Modifications des tests unitaires en fct du refacto

pull/5/head
Figg 9 months ago
parent
commit
f08f96b74b
2 changed files with 6 additions and 5 deletions
  1. 1
    1
      test/TestCase.py
  2. 5
    4
      test/model/message_test.py

+ 1
- 1
test/TestCase.py View File

6
 
6
 
7
 class TestCase(unittest.TestCase):
7
 class TestCase(unittest.TestCase):
8
     def _message_with_text(self, text: str):
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 View File

1
 
1
 
2
 
2
 
3
 from million.model.message import Message
3
 from million.model.message import Message
4
+import million.analyze.message_evaluation as msg_val
4
 from test.TestCase import TestCase
5
 from test.TestCase import TestCase
5
 
6
 
6
 
7
 
9
     def test_message_nominal(self, overrides=None, exclude=None):
10
     def test_message_nominal(self, overrides=None, exclude=None):
10
         message = self._message_with_text("1")
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
     def test_message_with_text(self, overrides=None, exclude=None):
15
     def test_message_with_text(self, overrides=None, exclude=None):
15
         message = self._message_with_text("1 text")
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
     def test_message_floored_dot(self, overrides=None, exclude=None):
20
     def test_message_floored_dot(self, overrides=None, exclude=None):
20
         message = self._message_with_text("1.5")
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
     def test_message_floored_comma(self, overrides=None, exclude=None):
25
     def test_message_floored_comma(self, overrides=None, exclude=None):
25
         message = self._message_with_text("1,5")
26
         message = self._message_with_text("1,5")
26
 
27
 
27
-        assert 1 == message.get_counted_value()
28
+        assert 1 == msg_val.get(message)

Loading…
Cancel
Save