def test_get_notice_url_from_archive_list_combine_match(
         self, mock_request):
     redirect_url = 'https://www.fbo.gov/index?s=opportunity&mode=list&tab=archives'
     soup = BeautifulSoup(handle_archive_redirect_table.body, 'html.parser')
     archive_list = soup.find('table', {'class': 'list'}).find_all('tr')
     notice_date = '052218'
     notice_type = 'COMBINE'
     mock_request.register_uri('GET',
                               url=redirect_url,
                               content=handle_archive_redirect_table.body,
                               status_code=200)
     result = get_notice_url_from_archive_list(redirect_url, archive_list,
                                               notice_date, notice_type)
     expected = 'https://www.fbo.gov/index?s=opportunity&mode=form&id=6577a9fff18f484f728af34bb6179872&tab=core&_cview=0'
     self.assertEqual(result, expected)
 def test_get_notice_url_from_archive_list_no_match(self, mock_request):
     redirect_url = 'https://www.fbo.gov/index?s=opportunity&mode=list&tab=archives'
     soup = BeautifulSoup(get_notice_url_from_archive_list_table.body,
                          'html.parser')
     archive_list = soup.find('table', {'class': 'list'}).find_all('tr')
     notice_date = '011715'
     notice_type = 'PRESOL'
     mock_request.register_uri(
         'GET',
         url=redirect_url,
         content=get_notice_url_from_archive_list_table.body,
         status_code=200)
     result = get_notice_url_from_archive_list(redirect_url, archive_list,
                                               notice_date, notice_type)
     expected = None
     self.assertEqual(result, expected)
 def test_get_notice_url_from_archive_list_amdcss_match(self, mock_request):
     redirect_url = 'https://www.fbo.gov/index?s=opportunity&mode=list&tab=archives'
     soup = BeautifulSoup(get_notice_url_from_archive_list_table.body,
                          'html.parser')
     archive_list = soup.find('table', {'class': 'list'}).find_all('tr')
     notice_date = '091818'
     notice_type = 'AMDCSS'
     mock_request.register_uri(
         'GET',
         url=redirect_url,
         content=get_notice_url_from_archive_list_table.body,
         status_code=200)
     result = get_notice_url_from_archive_list(redirect_url, archive_list,
                                               notice_date, notice_type)
     expected = 'https://www.fbo.gov/index?s=opportunity&mode=form&id=84701bd4a3fb4ee5638f62fcd8c675e9&tab=core&_cview=1'
     self.assertEqual(result, expected)
 def test_get_notice_url_from_archive_list_combine_mod_match(
         self, mock_request):
     redirect_url = 'https://www.fbo.gov/index?s=opportunity&mode=list&tab=archives'
     soup = BeautifulSoup(get_notice_url_from_archive_list_table.body,
                          'html.parser')
     archive_list = soup.find('table', {'class': 'list'}).find_all('tr')
     notice_date = '092018'
     notice_type = 'MOD'
     mock_request.register_uri(
         'GET',
         url=redirect_url,
         content=get_notice_url_from_archive_list_table.body,
         status_code=200)
     result = get_notice_url_from_archive_list(redirect_url, archive_list,
                                               notice_date, notice_type)
     expected = 'https://www.fbo.gov/index?s=opportunity&mode=form&id=a97a12ba6c20259ec5fefd436123b0d1&tab=core&_cview=1'
     self.assertEqual(result, expected)