示例#1
0
文件: tests.py 项目: iobis/geonode
 def test_should_return_as_url_site_url_and_keyword_id(self):
     expected = f"{self.site_url}/thesaurus/no-about-thesauro#38"
     keyword = ThesaurusKeyword.objects.get(id=38)
     actual = generate_thesaurus_reference(keyword)
     keyword.refresh_from_db()
     '''
     Check if the expected about has been created and that the instance is correctly updated
     '''
     self.assertEqual(expected, actual)
     self.assertEqual(expected, keyword.about)
示例#2
0
文件: tests.py 项目: iobis/geonode
 def test_should_return_as_url_thesaurus_about_and_keyword_id(self):
     expected = "http://inspire.ec.europa.eu/theme#37"
     keyword = ThesaurusKeyword.objects.get(id=37)
     actual = generate_thesaurus_reference(keyword)
     keyword.refresh_from_db()
     '''
     Check if the expected about has been created and that the instance is correctly updated
     '''
     self.assertEqual(expected, actual)
     self.assertEqual(expected, keyword.about)