[extensions-web/django/upgrade-1.8] tests: added missing variable
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/django/upgrade-1.8] tests: added missing variable
- Date: Tue, 1 Nov 2016 19:20:51 +0000 (UTC)
commit 08844fb8436b37aa633c8652bf1b8de69b3cf09f
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Tue Nov 1 21:58:44 2016 +0300
tests: added missing variable
sweettooth/extensions/tests.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index b27cfbf..0319c9b 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -463,6 +463,10 @@ class UpdateVersionTest(TestCase):
reject_uuid = 'reject-extension testcases sweettooth mecheye net'
downgrade_uuid = 'downgrade-extension testcases sweettooth mecheye net'
nonexistant_uuid = "blah-blah-blah testcases sweettooth mecheye net"
+ full_expected = {
+ upgrade_uuid: u'upgrade',
+ downgrade_uuid: u'downgrade',
+ reject_uuid: u'blacklist'}
def build_response(self, installed):
return dict((k, dict(version=v)) for k, v in installed.iteritems())
@@ -478,7 +482,7 @@ class UpdateVersionTest(TestCase):
uuid = self.upgrade_uuid
# The user has an old version, upgrade him
- expected = { uuid: 'upgrade' }
+ expected = {uuid: self.full_expected[self.upgrade_uuid]}
response = self.grab_response({ uuid: 1 })
self.assertEqual(response, expected)
@@ -489,7 +493,7 @@ class UpdateVersionTest(TestCase):
def test_reject_me(self):
uuid = self.reject_uuid
- expected = { uuid: 'blacklist' }
+ expected = {uuid: self.full_expected[self.reject_uuid]}
response = self.grab_response({ uuid: 1 })
self.assertEqual(response, expected)
@@ -501,7 +505,7 @@ class UpdateVersionTest(TestCase):
uuid = self.downgrade_uuid
# The user has a rejected version, so downgrade.
- expected = { uuid: 'downgrade' }
+ expected = { uuid: self.full_expected[self.downgrade_uuid] }
response = self.grab_response({ uuid: 2 })
self.assertEqual(response, expected)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]