예제 #1
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')
예제 #2
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
예제 #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
예제 #4
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
예제 #5
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
예제 #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'
            )