File: test_migrated_apps.py

package info (click to toggle)
python-jsonfield 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180 kB
  • sloc: python: 739; makefile: 15
file content (25 lines) | stat: -rw-r--r-- 600 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django.test import TestCase

from alterfield.models import AlterFieldModel
from datamigration.models import DataMigrationModel


class Testcases:
    def test_numeric(self):
        self.assertEqual(self.model.objects.get(pk=1).data, 1)

    def test_string(self):
        self.assertEqual(self.model.objects.get(pk=2).data, "foobar")

    def test_object(self):
        self.assertEqual(self.model.objects.get(pk=3).data, {"foo": "bar"})



class AlterFieldTests(Testcases, TestCase):
    model = AlterFieldModel



class DataMigrationTests(Testcases, TestCase):
    model = DataMigrationModel