Example #1
0
def tearDownModule():
    db = get_db_connection(settings)
    db.connection.drop_database(db.name)
Example #2
0
 def setUp(self):
     self.config = testing.setUp()
     self.db = get_db_connection(settings)
Example #3
0
import unittest
from datetime import datetime

from pyramid import testing

from booksoai.utils import get_db_connection
from booksoai.sync import mark_as_deleted
from booksoai.sync import get_updates, update_from_api, adapt_data

from mock import patch, call


settings = {}
settings['mongo_uri'] = 'mongodb://localhost:27017/scielobooks-test'
settings['scielo_uri'] = 'http://books.scielo.org/api/v1/'
settings['db_conn'] = get_db_connection(settings)


def tearDownModule():
    db = get_db_connection(settings)
    db.connection.drop_database(db.name)


class SyncTests(unittest.TestCase):

    def setUp(self):
        self.config = testing.setUp()
        self.db = get_db_connection(settings)
        
    def tearDown(self):
        testing.tearDown()