예제 #1
0
 def test_inserts(self):
     result = fk.parse_docfiles(DOCFILESDIR, 'static')
     fk.insert_link_to_latest(result, '%(project)s/blah')
     for projinfo in result:
         gotlink = projinfo['versions'][-1]['link']
         ideallink = '%s/blah' % projinfo['name']
         self.assertEqual(gotlink, ideallink)
예제 #2
0
 def test_inserts(self):
     result = fk.parse_docfiles(DOCFILESDIR, 'static')
     fk.insert_link_to_latest(result, '%(project)s/blah')
     for projinfo in result:
         gotlink = projinfo['versions'][-1]['link']
         ideallink = '%s/blah' % projinfo['name']
         self.assertEqual(gotlink, ideallink)
예제 #3
0
 def test_inserts(self):
     result = fk.parse_docfiles(DOCFILESDIR, "static")
     fk.insert_link_to_latest(result, "%(project)s/blah")
     for projinfo in result:
         gotlink = projinfo["versions"][-1]["link"]
         ideallink = "%s/blah" % projinfo["name"]
         self.assertEqual(gotlink, ideallink)
예제 #4
0
 def test_parses(self):
     result = fk.parse_docfiles(DOCFILESDIR, 'static')
     ideal = [
         {
             'name': 'project1',
             'description': 'Project description.',
             'versions': [
                 {'version': '1.0.1',
                  'link': 'static/project1/1.0.1/index.html'},
                 {'version': '1.2.0',
                  'link': 'static/project1/1.2.0/index.html'}
             ]
         },
         {
             # Caps to test sorting
             'name': 'Project2',
             'description': fk.DEFAULT_PROJECT_DESCRIPTION,
             'versions': [
                 {'version': '2.0.3',
                  'link': 'static/Project2/2.0.3/index.html'},
             ]
         },
         {
             'name': 'project3',
             'description': fk.DEFAULT_PROJECT_DESCRIPTION,
             'versions': [
                 {'version': '3.3.3',
                  'link': 'static/project3/3.3.3/index.html'},
             ]
         }
     ]
     self.assertEqual(result, ideal)
예제 #5
0
 def test_parses(self):
     result = fk.parse_docfiles(DOCFILESDIR, 'static')
     ideal = [
         {
             'name': 'project1',
             'description': 'Project description.',
             'versions': [
                 {'version': '1.0.1',
                  'link': 'static/project1/1.0.1/index.html'},
                 {'version': '1.2.0',
                  'link': 'static/project1/1.2.0/index.html'}
             ]
         },
         {
             # Caps to test sorting
             'name': 'Project2',
             'description': fk.DEFAULT_PROJECT_DESCRIPTION,
             'versions': [
                 {'version': '2.0.3',
                  'link': 'static/Project2/2.0.3/index.html'},
             ]
         },
         {
             'name': 'project3',
             'description': fk.DEFAULT_PROJECT_DESCRIPTION,
             'versions': [
                 {'version': '3.3.3',
                  'link': 'static/project3/3.3.3/index.html'},
             ]
         }
     ]
     self.assertEqual(result, ideal)
예제 #6
0
 def test_parses(self):
     result = fk.parse_docfiles(DOCFILESDIR, "static")
     ideal = [
         {
             "name": "project1",
             "description": "Project description.",
             "versions": [
                 {"version": "1.0.1", "link": "static/project1/1.0.1/index.html"},
                 {"version": "1.2.0", "link": "static/project1/1.2.0/index.html"},
             ],
         },
         {
             # Caps to test sorting
             "name": "Project2",
             "description": fk.DEFAULT_PROJECT_DESCRIPTION,
             "versions": [{"version": "2.0.3", "link": "static/Project2/2.0.3/index.html"}],
         },
         {
             "name": "project3",
             "description": fk.DEFAULT_PROJECT_DESCRIPTION,
             "versions": [{"version": "3.3.3", "link": "static/project3/3.3.3/index.html"}],
         },
     ]
     self.assertEqual(result, ideal)
예제 #7
0
 def test_not_existing_dir(self):
     self.assertEqual(fk.parse_docfiles('balh blah blah', 'static'), {})
예제 #8
0
 def test_not_existing_dir(self):
     self.assertEqual(fk.parse_docfiles("balh blah blah", "static"), {})
예제 #9
0
 def test_not_existing_dir(self):
     self.assertEqual(fk.parse_docfiles('balh blah blah', 'static'), {})