<reponame>EBRD-ProzorroSale/openprocurement.bridge.basic<gh_stars>0
# -*- coding: utf-8 -*-
import unittest

from openprocurement.bridge.basic.utils import journal_context, generate_req_id


class TestUtilsFunctions(unittest.TestCase):
    """Testing all functions inside utils.py."""

    def test_journal_context(self):
        self.assertEquals(journal_context(record={}, params={'test': 'test'}), {'JOURNAL_test': 'test'})

    def test_generate_req_id(self):
        req_id = generate_req_id()
        self.assertEquals(len(req_id), 64)
        self.assertEquals(req_id.startswith('contracting-data-bridge-req-'), True)


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestUtilsFunctions))
    return suite


if __name__ == '__main__':
    unittest.main(defaultTest='suite')

# -*- coding: utf-8 -*-
import unittest

from openprocurement.bridge.basic.utils import journal_context, generate_req_id


class TestUtilsFunctions(unittest.TestCase):
    """Testing all functions inside utils.py."""

    def test_journal_context(self):
        self.assertEquals(journal_context(record={}, params={'test': 'test'}), {'JOURNAL_test': 'test'})

    def test_generate_req_id(self):
        req_id = generate_req_id()
        self.assertEquals(len(req_id), 64)
        self.assertEquals(req_id.startswith('contracting-data-bridge-req-'), True)


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestUtilsFunctions))
    return suite


if __name__ == '__main__':
    unittest.main(defaultTest='suite')
# -*- coding: utf-8 -*- Testing all functions inside utils.py.