Exemplo n.º 1
0
 def test_sync_resources(self):
     self._register_resources()
     plugin = helper.TestPlugin()
     self.add_plugin(helper.TEST_PLUGIN, plugin)
     resources = plugin.get_test_resource1s(self.db_context)
     full_sync.sync_resources(self.db_context, helper.TEST_RESOURCE1)
     entries = [entry.data for entry in db.get_all_db_rows(self.db_context)]
     for resource in resources:
         self.assertIn(resource, entries)
     self.assertEqual(len(resources), len(entries))
Exemplo n.º 2
0
 def test_sync_resources(self):
     self._register_resources()
     plugin = helper.TestPlugin()
     self.add_plugin(helper.TEST_PLUGIN, plugin)
     resources = plugin.get_test_resource1s(self.db_context)
     full_sync.sync_resources(self.db_context,
                              helper.TEST_RESOURCE1)
     entries = [entry.data for entry in db.get_all_db_rows(self.db_context)]
     for resource in resources:
         self.assertIn(resource, entries)
     self.assertEqual(len(resources), len(entries))