@@ -0,0 +1,1424 @@
+import unittest%0Aimport mock%0A%0Afrom cla_public.apps.base import healthchecks%0A%0A%0Aclass DiskSpaceHealthcheckTest(unittest.TestCase):%0A    @mock.patch('os.statvfs')%0A    def test_disk_space_check_reports_on_available_and_total_space(self, stat_mock):%0A        stat_mock.return_value.f_bavail = 50 * 1024%0A        stat_mock.return_value.f_blocks = 100 * 1024%0A        stat_mock.return_value.f_frsize = 1024%0A%0A        result = healthchecks.check_disk()%0A        self.assertDictContainsSubset(%0A            %7B'available_percent': 50.0, 'available_mb': 50.0, 'total_mb': 100.0%7D, result)%0A%0A    @mock.patch('os.statvfs')%0A    def test_disk_space_check_passes_when_more_than_2_percent_space_is_available(self, stat_mock):%0A        stat_mock.return_value.f_bavail = 3 * 1024%0A        stat_mock.return_value.f_blocks = 100 * 1024%0A        stat_mock.return_value.f_frsize = 1024%0A%0A        result = healthchecks.check_disk()%0A        self.assertDictContainsSubset(%0A            %7B'status': True, 'available_percent': 3.0%7D, result)%0A%0A    @mock.patch('os.statvfs')%0A    def test_disk_space_check_fails_when_less_than_2_percent_space_is_available(self, stat_mock):%0A        stat_mock.return_value.f_bavail = 2 * 1024%0A        stat_mock.return_value.f_blocks = 100 * 1024%0A        stat_mock.return_value.f_frsize = 1024%0A%0A        result = healthchecks.check_disk()%0A        self.assertDictContainsSubset(%0A            %7B'status': False, 'available_percent': 2.0%7D, result)%0A

Add disk space healthcheck test