[973924]: / qiita_db / test / test_setup.py

Download this file

83 lines (55 with data), 2.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------------
from unittest import TestCase, main
from qiita_db.util import get_count, check_count
class SetupTest(TestCase):
"""Tests that the test database have been successfully populated"""
def test_qiita_user(self):
self.assertEqual(get_count("qiita.qiita_user"), 7)
def test_study_person(self):
self.assertEqual(get_count("qiita.study_person"), 3)
def test_study(self):
self.assertEqual(get_count("qiita.study"), 1)
def test_study_users(self):
self.assertEqual(get_count("qiita.study_users"), 1)
def test_investigation(self):
self.assertEqual(get_count("qiita.investigation"), 1)
def test_investigation_study(self):
self.assertEqual(get_count("qiita.investigation_study"), 1)
def test_filepath(self):
self.assertEqual(get_count("qiita.filepath"), 23)
def test_filepath_type(self):
self.assertEqual(get_count("qiita.filepath_type"), 25)
def test_study_prep_template(self):
self.assertEqual(get_count("qiita.study_prep_template"), 2)
def test_required_sample_info(self):
self.assertEqual(get_count("qiita.study_sample"), 27)
def test_sample_1(self):
self.assertEqual(get_count("qiita.sample_1"), 28)
def test_prep_template(self):
self.assertEqual(get_count("qiita.prep_template"), 2)
def test_prep_template_sample(self):
self.assertEqual(get_count("qiita.prep_template_sample"), 54)
def test_prep_1(self):
self.assertEqual(get_count("qiita.prep_1"), 28)
def test_reference(self):
self.assertEqual(get_count("qiita.reference"), 2)
def test_analysis(self):
self.assertEqual(get_count("qiita.analysis"), 10)
def test_analysis_filepath(self):
self.assertEqual(get_count("qiita.analysis_filepath"), 2)
def test_analysis_sample(self):
self.assertEqual(get_count("qiita.analysis_sample"), 31)
def test_analysis_users(self):
self.assertEqual(get_count("qiita.analysis_users"), 1)
def test_ontology(self):
self.assertTrue(check_count('qiita.ontology', 1))
def test_ontology_terms(self):
self.assertTrue(check_count('qiita.term', 5))
if __name__ == '__main__':
main()