Commit bf86322a authored by Michal Čihař's avatar Michal Čihař

Initial test for checks

parent 19147d06
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
from test_checks import *
"""
Tests for consistency checks.
"""
from django.test import TestCase
from weblate.trans.checks import SameCheck
class Language(object):
'''
Mock language object.
'''
def __init__(self, code):
self.code = code
class CheckTest(TestCase):
def test_same(self):
check = SameCheck()
self.assertFalse(check.check_single(
'source',
'translation',
'',
Language('cs'),
None
))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment