File: test_command.py

package info (click to toggle)
python-enmerkar 0.7.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: python: 644; makefile: 167; sh: 9
file content (20 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os

import pkg_resources
from django.core.management import call_command

TEST_LOCALE_DIR = pkg_resources.resource_filename(
    'testproject', 'locale'
)


def test_babel_compilemessages():
    call_command(
        'babel',
        'compilemessages',
        '-l', 'fi',
    )
    # Assert that the .mo file was created by attempting to delete it.
    os.unlink(
        os.path.join(TEST_LOCALE_DIR, 'fi', 'LC_MESSAGES', 'django.mo')
    )