from os import environ

environ["config"] = '{"MONGO_URI": "mongodb://admin:iLens!8989@192.168.0.220:21017", "MONGO_DATABASE": "ilens_wps", ' \
                    '"MONGO_DB": "ilens_wps","MONGO_COLLECTION": "janusDeployment", "MONGO_KEY": "deploymentId", ' \
                    '"MONGO_VALUE": "1b180a0e", "MONGO_SERVICE_COLL": "serviceConfiguration", "MONGO_COLL": ' \
                    '"serviceConfiguration"  } '
import unittest

from edge_engine.edge_processor import Pubs
from edge_engine.common.config import EDGE_CONFIG
from scripts.cement_counter import CementBagCounter


class TestCementBagCounter(unittest.TestCase):

    def test__pre_process(self):
        self.assertEqual(CementBagCounter(config=EDGE_CONFIG, model_config=EDGE_CONFIG["modelConfig"], pubs=Pubs(),
                                          device_id=EDGE_CONFIG['deviceId'])._pre_process("5"), '5')
