1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #27546 -- Tested some __repr__() methods.

This commit is contained in:
Keda87
2016-11-29 12:54:17 +07:00
committed by Tim Graham
parent 78500102b7
commit 794b7d8033
5 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import os
from django.core.management.commands.makemessages import TranslatableFile
from django.test import SimpleTestCase
class TranslatableFileTests(SimpleTestCase):
def test_repr(self):
dirpath = 'dir'
file_name = 'example'
trans_file = TranslatableFile(dirpath=dirpath, file_name=file_name, locale_dir=None)
self.assertEqual(repr(trans_file), '<TranslatableFile: %s>' % os.path.join(dirpath, file_name))