Page MenuHome

test_shortcode.py
No OneTemporary

File Metadata

Created
Wed, Sep 18, 11:07 PM

test_shortcode.py

# -*- coding=utf-8 -*-
import collections
import datetime
import logging.config
import unittest
from dateutil.tz import tzutc
import mock
import svn.common
from pillar.tests import common_test_data as ctd
import logging_config
from attract import subversion
from abstract_attract_test import AbstractAttractTest
SVN_SERVER_URL = 'svn://biserver/agent327'
class ShortcodeTest(AbstractAttractTest):
def setUp(self, **kwargs):
AbstractAttractTest.setUp(self, **kwargs)
self.mngr = self.attract.task_manager
self.proj_id, self.project = self.ensure_project_exists()
def test_increment_simple(self):
from attract import shortcodes
with self.app.test_request_context():
code = shortcodes.generate_shortcode(self.proj_id, 'jemoeder', 'ø')
self.assertEqual('ø1', code)
with self.app.test_request_context():
code = shortcodes.generate_shortcode(self.proj_id, 'jemoeder', 'č')
self.assertEqual('č2', code)

Event Timeline