Completed
Push — master ( 726486...b38261 )
by Paolo
19s queued 14s
created

submissions.tests.test_helpers   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TargetInMessageTest.test_target_in() 0 3 1
A TargetInMessageTest.test_target_not_in() 0 3 1
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
"""
4
Created on Wed Sep 18 13:23:20 2019
5
6
@author: Paolo Cozzi <[email protected]>
7
"""
8
9
from django.test import TestCase
10
11
from ..helpers import is_target_in_message
12
13
14
class TargetInMessageTest(TestCase):
15
    def test_target_in(self):
16
        test = is_target_in_message('meow', ['meow', 'bark'])
17
        self.assertTrue(test)
18
19
    def test_target_not_in(self):
20
        test = is_target_in_message('meow', ['bark'])
21
        self.assertFalse(test)
22