Example #1
0
    def test_not_allowed_creation(self):
        package = PackageFactory.create()
        VersionFactory.create(package=package)

        with self.assertRaises((IntegrityError, ValidationError)):
            VersionFactory.create(package=package)
Example #2
0
    def test_not_allowed_creation(self):
        package = PackageFactory.create()
        VersionFactory.create(package=package)

        with self.assertRaises((IntegrityError, ValidationError)):
            VersionFactory.create(package=package)
Example #3
0
 def test_creation(self):
     package = PackageFactory.build()
     version = VersionFactory.build(package=package)
     self.assertEqual(version.package, package)
Example #4
0
 def test_creation(self):
     package = PackageFactory.build()
     version = VersionFactory.build(package=package)
     self.assertEqual(version.package, package)