@@ -0,0 +1,1991 @@
+# coding: utf-8%0A#%0A# Copyright 2018 The Oppia Authors. All Rights Reserved.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#      http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS-IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22Tests for methods in the gae_memcache_services.%22%22%22%0A%0Afrom core.platform.memcache import gae_memcache_services%0Afrom core.tests import test_utils%0A%0A%0Aclass GaeMemcacheServicesUnitTests(test_utils.GenericTestBase):%0A    %22%22%22Tests for gae_memcache_services.%22%22%22%0A%0A    def setUp(self):%0A        super(GaeMemcacheServicesUnitTests, self).setUp()%0A        self.keys = %5B'a', 'b', 'c'%5D%0A        self.key_value_mapping = %7B'a': 1, 'b': 2, 'c': 3%7D%0A        self.exp_list = gae_memcache_services.set_multi(self.key_value_mapping)%0A%0A    def test_get_multi(self):%0A        exp_dict = gae_memcache_services.get_multi(self.keys)%0A        self.assertEqual(exp_dict, self.key_value_mapping)%0A%0A    def test_set_multi(self):%0A        self.assertEqual(self.exp_list, %5B%5D)%0A%0A    def test_delete(self):%0A        return_code_key_present = gae_memcache_services.delete('a')%0A        return_code_key_not_present = gae_memcache_services.delete('d')%0A        self.assertEqual(return_code_key_present, 2)%0A        self.assertEqual(return_code_key_not_present, 1)%0A%0A    def test_delete_multi(self):%0A        return_value_keys_present = gae_memcache_services.delete_multi(%0A            self.keys)%0A        return_value_keys_not_present = gae_memcache_services.delete_multi(%0A            %5B'd', 'e', 'f'%5D)%0A        self.assertEqual(return_value_keys_present, True)%0A        self.assertEqual(return_value_keys_not_present, True)%0A

Fix part of #5134.: Added tests for memcache services (#5355)