Пример #1
0
    def test_800_sync_identifier(self):
        # mostly a dummy at this stage.
        utility = DummyStorageUtility()
        newworkspace = DummyWorkspace('new')
        utility.syncIdentifier(newworkspace, 'cake')

        storage = DummyStorage(newworkspace)
        storage.checkout()
        self.assert_('null' in storage.files())
Пример #2
0
    def test_801_sync_workspace(self):
        # mostly a dummy at this stage.
        utility = DummyStorageUtility()
        new2 = DummyWorkspace('new2')
        cake = DummyWorkspace('cake')
        utility.syncWorkspace(new2, cake)

        storage = DummyStorage(new2)
        storage.checkout()
        self.assert_('null' in storage.files())
Пример #3
0
    def test_950_loader(self):
        # Test loading from filesystem.
        target = join(dirname(pmr2.testing.__file__), 'data', 'rdfmodel')
        utility = DummyStorageUtility()
        utility._loadDir('rdfmodel', target)

        self.assertTrue('rdfmodel' in utility._dummy_storage_data)
        self.assertEqual(len(utility._dummy_storage_data['rdfmodel']), 4)

        self.assertEqual(len(utility._dummy_storage_data['rdfmodel'][0]), 2)
        self.assertEqual(len(utility._dummy_storage_data['rdfmodel'][0].get(
            'component/module.cellml')), 4197)

        self.assertEqual(len(utility._dummy_storage_data['rdfmodel'][1]), 5)
        self.assertEqual(len(utility._dummy_storage_data['rdfmodel'][1].get(
            'example_model.cellml')), 4288)

        self.assertEqual(utility._dummy_storage_data['rdfmodel'][2].get(
            'component/README'),
                'This is a readme file inside the component directory.\n')

        self.assertEqual(len(utility._dummy_storage_data['rdfmodel'][3].get(
            'component/module.cellml')), 4197)