Beispiel #1
0
 def test_package_03(self):
     package = self.base_package
     package["summary"] = """
     multiline
     summary
     """
     with self.assertRaises(ValidationError):
         PackageCreate(**package)
Beispiel #2
0
 def test_package_07(self):
     package = self.base_package
     package["author_email"] = "*****@*****.**"
     package["description_content_type"] = "text/plain"
     package["home_page"] = "http://example.com"
     package["license"] = "MIT"
     package["package_url"] = "http://package.com"
     package["project_url"] = "http://project.com"
     package["summary"] = "test project"
     package["description"] = "yes"
     package["keywords"] = "ok"
     try:
         PackageCreate(**package)
     except Exception as err:
         self.fail("test_package_07 should not have raised {}".format(err))
Beispiel #3
0
 def test_package_06(self):
     package = self.base_package
     package["author_email"] = "invalidemail"
     with self.assertRaises(ValidationError):
         PackageCreate(**package)
Beispiel #4
0
 def test_package_05(self):
     package = self.base_package
     package["description_content_type"] = "invalid"
     with self.assertRaises(ValidationError):
         PackageCreate(**package)
Beispiel #5
0
 def test_package_04(self):
     package = self.base_package
     package["summary"] = "A" * 600
     with self.assertRaises(ValidationError):
         PackageCreate(**package)
Beispiel #6
0
 def test_package_02(self):
     package = self.base_package
     package["version"] = " 0.1.2"
     with self.assertRaises(ValidationError):
         PackageCreate(**package)
Beispiel #7
0
 def test_package_01(self):
     package = self.base_package
     package["name"] = "invalidchars~~"
     with self.assertRaises(ValidationError):
         PackageCreate(**package)
Beispiel #8
0
 def test_package_00(self):
     try:
         PackageCreate(**self.base_package)
     except Exception as err:
         self.fail("test_package_00 should not have raised {}".format(err))