File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+ from django .core .management import call_command
4
+
5
+
6
+
7
+ @pytest .fixture
8
+ def arches (db ):
9
+ call_command ('loaddata' , 'main/fixtures/arches.json' )
10
+
11
+
12
+ @pytest .fixture
13
+ def repos (db ):
14
+ call_command ('loaddata' , 'main/fixtures/repos.json' )
15
+
16
+
17
+ @pytest .fixture
18
+ def package (db ):
19
+ # TODO(jelle): create own parameter based version
20
+ call_command ('loaddata' , 'main/fixtures/package.json' )
Original file line number Diff line number Diff line change 1
- from django .test import TestCase
2
-
3
-
4
- class VisualeTest (TestCase ):
5
- fixtures = ['main/fixtures/arches.json' , 'main/fixtures/repos.json' ,
6
- 'main/fixtures/package.json' ]
7
-
8
- def test_urls (self ):
9
- for url in ['' , 'by_repo/' , 'by_arch/' ]:
10
- response = self .client .get ('/visualize/{}' .format (url ))
11
- self .assertEqual (response .status_code , 200 )
1
+ def test_urls (client , arches , repos , package ):
2
+ for url in ['' , 'by_repo/' , 'by_arch/' ]:
3
+ response = client .get ('/visualize/{}' .format (url ))
4
+ assert response .status_code == 200
You can’t perform that action at this time.
0 commit comments