From c7432daca9a2cfd5ab506552446700932a99bc33 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 11 Nov 2016 01:23:31 +0200 Subject: Try to use country code for purchase_country --- servo/tests/test_models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'servo/tests') diff --git a/servo/tests/test_models.py b/servo/tests/test_models.py index b0ef6e7..ba3b714 100644 --- a/servo/tests/test_models.py +++ b/servo/tests/test_models.py @@ -7,6 +7,19 @@ from servo.models.common import Configuration from servo.models.order import Order from servo.models.account import User from servo.models.queue import Queue +from servo.models.device import Device + + +class DeviceTests(TestCase): + def test_purchase_country_code(self): + device = Device() + device.purchase_country = 'SE' + self.assertEquals(device.get_purchase_country(), 'Sweden') + + def test_purchase_country(self): + device = Device() + device.purchase_country = 'Sweden' + self.assertEquals(device.get_purchase_country(), 'Sweden') class ConfigurationTests(TestCase): -- cgit v1.2.3