# -*- coding: utf-8 -*-
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu (muchu1983@gmail.com)
This file is part of BSD license

<https://opensource.org/licenses/BSD-3-Clause>
"""
import unittest
import logging
from cameo.externaldb import ExternalDbForCurrencyApi
"""
測試 外部資料庫存取
"""
class ExternalDbTest(unittest.TestCase):

    #準備
    def setUp(self):
        logging.basicConfig(level=logging.INFO)
        self.cameoDb = ExternalDbForCurrencyApi()
        
    #收尾
    def tearDown(self):
        pass

    #測試 currency api 外部資料庫存取
    def test_externaldb_for_currency_api(self):
        logging.info("ExternalDbTest.test_externaldb_for_currency_api")
        self.assertIsNotNone(self.cameoDb.mongodb)

#測試開始
if __name__ == "__main__":
    unittest.main(exit=False)



@@ -711,16 +711,103 @@
 ongodb)%0A
+        self.assertTrue(self.cameoDb.mongodb.ModelExRate.find(%7B%7D).count() %3E 0)%0A        
 %0A#%E6%B8%AC%E8%A9%A6%E9%96%8B%E5%A7%8B%0Ai

add precise mongodb connection test