示例#1
0
 def test_invalid_values(self):
     di = DiscInfo()
     di.timestamp = "foo"
     di.description = "Fedora 21"
     di.arch = "x86_64"
     di.disc_numbers = ["ALL"]
     self.assertRaises(TypeError, di.dumps)
示例#2
0
 def test_invalid_values(self):
     di = DiscInfo()
     di.timestamp = "foo"
     di.description = "Fedora 21"
     di.arch = "x86_64"
     di.disc_numbers = ["ALL"]
     self.assertRaises(TypeError, di.dumps)
示例#3
0
    def test_disc_numbers(self):
        di = DiscInfo()
        di.timestamp = 1386856788.124593
        di.description = "Fedora 20"
        di.arch = "x86_64"
        di.disc_numbers = [1, "2", 3]
        di.dump(self.path)

        self._test_identity(di)
示例#4
0
    def test_all(self):
        di = DiscInfo()
        di.now()
        di.description = "Fedora 20"
        di.arch = "x86_64"
        di.disc_numbers = ["ALL"]
        di.dump(self.path)

        self._test_identity(di)
示例#5
0
    def test_disc_numbers(self):
        di = DiscInfo()
        di.timestamp = 1386856788.124593
        di.description = "Fedora 20"
        di.arch = "x86_64"
        di.disc_numbers = [1, "2", 3]
        di.dump(self.path)

        self._test_identity(di)
示例#6
0
    def test_all(self):
        di = DiscInfo()
        di.now()
        di.description = "Fedora 20"
        di.arch = "x86_64"
        di.disc_numbers = ["ALL"]
        di.dump(self.path)

        self._test_identity(di)