|
23 | 23 | from compare.models import CommitComparison |
24 | 24 | from compare.tests.factories import CommitComparisonFactory |
25 | 25 | from core.models import Commit |
26 | | -from reports.models import ReportDetails |
27 | 26 | from reports.tests.factories import CommitReportFactory |
28 | 27 | from services.comparison import ( |
29 | 28 | CommitComparisonService, |
@@ -1792,14 +1791,6 @@ def setUp(self): |
1792 | 1791 | self.compare_commit = CommitFactory(updatestamp=datetime(2023, 1, 1)) |
1793 | 1792 | self.base_commit_report = CommitReportFactory(commit=self.base_commit) |
1794 | 1793 | self.compare_commit_report = CommitReportFactory(commit=self.compare_commit) |
1795 | | - self.base_report_details = ReportDetails.objects.create( |
1796 | | - report_id=self.base_commit_report.id, |
1797 | | - _files_array=[], |
1798 | | - ) |
1799 | | - self.compare_report_details = ReportDetails.objects.create( |
1800 | | - report_id=self.compare_commit_report.id, |
1801 | | - _files_array=[], |
1802 | | - ) |
1803 | 1794 | self.commit_comparison = CommitComparisonFactory( |
1804 | 1795 | base_commit=self.base_commit, |
1805 | 1796 | compare_commit=self.compare_commit, |
@@ -1841,27 +1832,3 @@ def test_stale_compare_commit(self): |
1841 | 1832 | service = CommitComparisonService(commit_comparison) |
1842 | 1833 |
|
1843 | 1834 | assert service.needs_recompute() == True |
1844 | | - |
1845 | | - def test_stale_base_report_details(self): |
1846 | | - # base report details were updated after comparison was made |
1847 | | - self.commit_comparison.updated_at = datetime(2021, 1, 1, tzinfo=pytz.utc) |
1848 | | - self.commit_comparison.save() |
1849 | | - self.base_report_details.updated_at = datetime(2023, 1, 2, tzinfo=pytz.utc) |
1850 | | - self.base_report_details.save() |
1851 | | - |
1852 | | - commit_comparison = CommitComparison.objects.get(pk=self.commit_comparison.pk) |
1853 | | - service = CommitComparisonService(commit_comparison) |
1854 | | - |
1855 | | - assert service.needs_recompute() == True |
1856 | | - |
1857 | | - def test_stale_compare_report_details(self): |
1858 | | - # compare report details were updated after comparison was made |
1859 | | - self.commit_comparison.updated_at = datetime(2021, 1, 1, tzinfo=pytz.utc) |
1860 | | - self.commit_comparison.save() |
1861 | | - self.compare_report_details.updated_at = datetime(2023, 1, 2, tzinfo=pytz.utc) |
1862 | | - self.compare_report_details.save() |
1863 | | - |
1864 | | - commit_comparison = CommitComparison.objects.get(pk=self.commit_comparison.pk) |
1865 | | - service = CommitComparisonService(commit_comparison) |
1866 | | - |
1867 | | - assert service.needs_recompute() == True |
0 commit comments