# Path: stackalytics/processor/default_data_processor.py
# LOG = logging.getLogger(__name__)
# GITHUB_URI_PREFIX = r'^github:\/\/'
# STORE_FUNCS = {
#     'users': _store_users,
#     'companies': _store_companies,
#     'module_groups': _store_module_groups,
# }
# def _check_default_data_change(runtime_storage_inst, default_data):
# def _retrieve_project_list_from_sources(project_sources):
# def _retrieve_project_list_from_gerrit(project_source):
# def _retrieve_project_list_from_github(project_source):
# def _create_module_groups_for_project_sources(project_sources, repos):
# def _update_project_list(default_data):
# def _update_with_driverlog_data(default_data, driverlog_data_uri):
# def _store_users(runtime_storage_inst, users):
# def _store_companies(runtime_storage_inst, companies):
# def _store_module_groups(runtime_storage_inst, module_groups):
# def _store_default_data(runtime_storage_inst, default_data):
# def process(runtime_storage_inst, default_data, driverlog_data_uri):
# 
# Path: stackalytics/processor/normalizer.py
# LOG = logging.getLogger(__name__)
# NORMALIZERS = {
#     'users': _normalize_users,
#     'releases': _normalize_releases,
#     'repos': _normalize_repos,
# }
# def _normalize_user(user):
#     def end_date_comparator(x, y):
# def _normalize_users(users):
# def _normalize_releases(releases):
# def _normalize_repos(repos):
# def normalize_default_data(default_data):


import copy
import mock
import testtools
from stackalytics.processor import default_data_processor
from stackalytics.processor import normalizer
from stackalytics.tests.unit import test_data
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.





class TestDefaultDataProcessor(testtools.TestCase):
    def setUp(self):
        super(TestDefaultDataProcessor, self).setUp()

        self.get_users = mock.Mock(return_value=[
            test_data.USERS,
        ])

        normalized_data = copy.deepcopy(test_data.DEFAULT_DATA)
        normalizer.normalize_default_data(normalized_data)

    def tearDown(self):
        super(TestDefaultDataProcessor, self).tearDown()

    def test_normalizer(self):
        data = copy.deepcopy(test_data.DEFAULT_DATA)


# Path: stackalytics/processor/default_data_processor.py
# LOG = logging.getLogger(__name__)
# GITHUB_URI_PREFIX = r'^github:\/\/'
# STORE_FUNCS = {
#     'users': _store_users,
#     'companies': _store_companies,
#     'module_groups': _store_module_groups,
# }
# def _check_default_data_change(runtime_storage_inst, default_data):
# def _retrieve_project_list_from_sources(project_sources):
# def _retrieve_project_list_from_gerrit(project_source):
# def _retrieve_project_list_from_github(project_source):
# def _create_module_groups_for_project_sources(project_sources, repos):
# def _update_project_list(default_data):
# def _update_with_driverlog_data(default_data, driverlog_data_uri):
# def _store_users(runtime_storage_inst, users):
# def _store_companies(runtime_storage_inst, companies):
# def _store_module_groups(runtime_storage_inst, module_groups):
# def _store_default_data(runtime_storage_inst, default_data):
# def process(runtime_storage_inst, default_data, driverlog_data_uri):
# 
# Path: stackalytics/processor/normalizer.py
# LOG = logging.getLogger(__name__)
# NORMALIZERS = {
#     'users': _normalize_users,
#     'releases': _normalize_releases,
#     'repos': _normalize_repos,
# }
# def _normalize_user(user):
#     def end_date_comparator(x, y):
# def _normalize_users(users):
# def _normalize_releases(releases):
# def _normalize_repos(repos):
# def normalize_default_data(default_data):


# Path: stackalytics/tests/unit/test_default_data_processor.py
import copy
import mock
import testtools
from stackalytics.processor import default_data_processor
from stackalytics.processor import normalizer
from stackalytics.tests.unit import test_data

#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.





class TestDefaultDataProcessor(testtools.TestCase):
    def setUp(self):
        super(TestDefaultDataProcessor, self).setUp()

        self.get_users = mock.Mock(return_value=[
            test_data.USERS,
        ])

        normalized_data = copy.deepcopy(test_data.DEFAULT_DATA)
        normalizer.normalize_default_data(normalized_data)

    def tearDown(self):
        super(TestDefaultDataProcessor, self).tearDown()

    def test_normalizer(self):
        data = copy.deepcopy(test_data.DEFAULT_DATA)


        normalizer.normalize_default_data(data)