Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: appengine/findit/gae_libs/model/test/versioned_config_test.py

Issue 2488113005: [Findit] Re-org code. (Closed)
Patch Set: Rebase. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from google.appengine.ext import ndb 5 from google.appengine.ext import ndb
6 from google.appengine.api import users 6 from google.appengine.api import users
7 from testing_utils import testing 7 from testing_utils import testing
8 8
9 from model.versioned_config import VersionedConfig 9 from gae_libs.model.versioned_config import VersionedConfig
10 10
11 11
12 class _Config(VersionedConfig): 12 class _Config(VersionedConfig):
13 a = ndb.IntegerProperty(indexed=False, default=0) 13 a = ndb.IntegerProperty(indexed=False, default=0)
14 14
15 15
16 class VersionedConfigTest(testing.AppengineTestCase): 16 class VersionedConfigTest(testing.AppengineTestCase):
17 17
18 def _CreateFirstVersion(self): 18 def _CreateFirstVersion(self):
19 config = _Config.Get() 19 config = _Config.Get()
(...skipping 25 matching lines...) Expand all
45 self._CreateFirstVersion() 45 self._CreateFirstVersion()
46 config = _Config.Get() 46 config = _Config.Get()
47 self.assertIsNotNone(config) 47 self.assertIsNotNone(config)
48 self.assertFalse(config.Update(users.User(email='admin@chromium.org'), True, 48 self.assertFalse(config.Update(users.User(email='admin@chromium.org'), True,
49 a=1)) 49 a=1))
50 50
51 config = _Config.Get() 51 config = _Config.Get()
52 self.assertIsNotNone(config) 52 self.assertIsNotNone(config)
53 self.assertEqual(1, config.version_number) 53 self.assertEqual(1, config.version_number)
54 self.assertEqual(1, config.a) 54 self.assertEqual(1, config.a)
OLDNEW
« no previous file with comments | « appengine/findit/gae_libs/model/test/__init__.py ('k') | appengine/findit/gae_libs/model/test/versioned_model_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698