def test_no_bulk_read_structure(self, version_guid): # Reading a structure when no bulk operation is active should just call # through to the db_connection result = self.bulk.get_structure(self.course_key, version_guid) self.assertConnCalls(call.get_structure(self.course_key.as_object_id(version_guid), self.course_key)) self.assertEqual(result, self.conn.get_structure.return_value) self.assertCacheNotCleared()
def test_no_bulk_read_structure(self, version_guid): # Reading a structure when no bulk operation is active should just call # through to the db_connection result = self.bulk.get_structure(self.course_key, version_guid) self.assertConnCalls(call.get_structure(self.course_key.as_object_id(version_guid))) self.assertEqual(result, self.conn.get_structure.return_value) self.assertCacheNotCleared()
def test_no_bulk_read_structure(self, version_guid_name): # Reading a structure when no bulk operation is active should just call # through to the db_connection version_guid = VERSION_GUID_DICT[version_guid_name] result = self.bulk.get_structure(self.course_key, version_guid) self.assertConnCalls( call.get_structure(self.course_key.as_object_id(version_guid), self.course_key)) assert result == self.conn.get_structure.return_value self.assertCacheNotCleared()