Exemple #1
0
 def test_save(self):
     rs = ReportStorage()
     rs.dirPath = self.tempdir
     rs.default = True
     rs.name = 'HomeTest'
     rs.webServerPath = '/outputTest'
     rs.save()
     self.assertIsNotNone(rs.id, 'ReportStorage id is None')
     return rs
Exemple #2
0
 def setUp(self):
     self.tempdir = tempfile.mkdtemp()
     rs = ReportStorage()
     rs.dirPath = self.tempdir
     rs.default = True
     rs.name = 'HomeTest'
     rs.webServerPath = '/outputTest'
     rs.save()
     self.reportstorage = rs
Exemple #3
0
 def setUp(self):
     self.tempdir = tempfile.mkdtemp()
     rs = ReportStorage()
     rs.dirPath = self.tempdir
     rs.default = True
     rs.name = 'HomeTest'
     rs.webServerPath = '/outputTest'
     rs.save()
     self.reportstorage = rs
Exemple #4
0
 def test_save(self):
     rs = ReportStorage()
     rs.dirPath = self.tempdir
     rs.default = True
     rs.name = 'HomeTest'
     rs.webServerPath = '/outputTest'
     rs.save()
     self.assertIsNotNone(rs.id, 'ReportStorage id is None')
     return rs
Exemple #5
0
    def test_save_method(self):
        rs = ReportStorage()
        rs.dirPath = self.tempdir
        rs.default = True
        rs.name = 'HomeTest'
        rs.webServerPath = '/outputTest'
        rs.save()

        rs = ReportStorage()
        rs.dirPath = self.tempdir2
        rs.default = True
        rs.name = 'HomeTest'
        rs.webServerPath = '/outputTest'
        rs.save()

        for rs in ReportStorage.objects.exclude(id=rs.id):
            self.assertFalse(
                rs.default,
                'Should not be default report storage location, only one default location is allowed'
            )
Exemple #6
0
    def test_save_method(self):
        rs = ReportStorage()
        rs.dirPath = self.tempdir
        rs.default = True
        rs.name = 'HomeTest'
        rs.webServerPath = '/outputTest'
        rs.save()

        rs = ReportStorage()
        rs.dirPath = self.tempdir2
        rs.default = True
        rs.name = 'HomeTest'
        rs.webServerPath = '/outputTest'
        rs.save()

        for rs in ReportStorage.objects.exclude(id=rs.id):
            self.assertFalse(rs.default, 'Should not be default report storage location, only one default location is allowed')