Fix tests for Python 3
- drop Python 2 __future__ imports - fix tests to handle new Django and Python 3 module names - reformat changed files with black
This commit is contained in:
parent
ddec6b4184
commit
3d18392b67
32 changed files with 2707 additions and 2675 deletions
|
@ -5,10 +5,7 @@ Test for models.
|
|||
|
||||
from django.test import TestCase
|
||||
|
||||
from hostingpackages.models import (
|
||||
DISK_SPACE_UNITS,
|
||||
CustomerHostingPackage,
|
||||
)
|
||||
from hostingpackages.models import DISK_SPACE_UNITS, CustomerHostingPackage
|
||||
|
||||
|
||||
class CustomerHostingPackageTest(TestCase):
|
||||
|
@ -16,7 +13,7 @@ class CustomerHostingPackageTest(TestCase):
|
|||
package = CustomerHostingPackage(
|
||||
diskspace=10, diskspace_unit=DISK_SPACE_UNITS.G
|
||||
)
|
||||
self.assertEqual(package.get_disk_space(), 10 * 1024 * 1024**2)
|
||||
self.assertEqual(package.get_disk_space(), 10 * 1024 ** 3)
|
||||
|
||||
def test_get_disk_space_mib(self):
|
||||
package = CustomerHostingPackage(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue