Coverage for tests/mock_data/search_mock.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-27 22:07 +0000

1sample_packages_api_response = { 

2 "results": [ 

3 {"name": "testing1", "type": "charm", "other_field": "value1"}, 

4 {"name": "testing2", "type": "bundle", "other_field": "value2"}, 

5 {"name": "testing3", "type": "charm", "other_field": "value1"}, 

6 {"name": "testing4", "type": "bundle", "other_field": "value2"}, 

7 {"name": "testing5", "type": "charm", "other_field": "value2"}, 

8 {"name": "testing6", "type": "charm", "other_field": "value1"}, 

9 {"name": "testing7", "type": "bundle", "other_field": "value2"}, 

10 {"name": "testing8", "type": "charm", "other_field": "value1"}, 

11 {"name": "testing9", "type": "bundle", "other_field": "value2"}, 

12 {"name": "testing10", "type": "charm", "other_field": "value2"}, 

13 ] 

14} 

15 

16sample_charms = { 

17 "charms": [ 

18 {"name": "testing1", "type": "charm", "other_field": "value1"}, 

19 {"name": "testing3", "type": "charm", "other_field": "value1"}, 

20 {"name": "testing5", "type": "charm", "other_field": "value2"}, 

21 {"name": "testing6", "type": "charm", "other_field": "value1"}, 

22 {"name": "testing8", "type": "charm", "other_field": "value1"}, 

23 ] 

24} 

25 

26sample_bundles = { 

27 "bundles": [ 

28 {"name": "testing2", "type": "bundle", "other_field": "value2"}, 

29 {"name": "testing4", "type": "bundle", "other_field": "value2"}, 

30 {"name": "testing7", "type": "bundle", "other_field": "value2"}, 

31 {"name": "testing9", "type": "bundle", "other_field": "value2"}, 

32 {"name": "testing10", "type": "bundle", "other_field": "value2"}, 

33 ] 

34} 

35 

36sample_docs = { 

37 "docs": [ 

38 { 

39 "blocks": [ 

40 { 

41 "content": "Source: https://github.com/juju/juju", 

42 "highlights": { 

43 "content": [ 

44 "util functions designed to help in creating" 

45 ], 

46 "title": ["<span>Test</span> includes"], 

47 }, 

48 "id": "test-includes", 

49 "title": "Test includes", 

50 "type": "section", 

51 } 

52 ], 

53 "domain": "https://canonical-juju.readthedocs-hosted.com", 

54 "highlights": {"title": ["<span>Test</span> includes"]}, 

55 "path": "/en/3.6/contributor/reference/testing/integration", 

56 "project": {"alias": None, "slug": "canonical-juju"}, 

57 "title": "Test includes", 

58 "type": "page", 

59 "version": {"slug": "3.6"}, 

60 }, 

61 { 

62 "blocks": [ 

63 { 

64 "content": "Source: https://github.com/juju/juju", 

65 "highlights": { 

66 "content": [ 

67 "Integration <span>test</span> suites are often " 

68 ], 

69 "title": ["Integration <span>test</span> suite"], 

70 }, 

71 "id": "integration-test-suite", 

72 "title": "Integration test suite", 

73 "type": "section", 

74 } 

75 ], 

76 "domain": "https://canonical-juju.readthedocs-hosted.com", 

77 "highlights": {"title": ["Integration <span>test</span> suite"]}, 

78 "path": "/en/3.6/contributor/reference/testing/", 

79 "project": {"alias": None, "slug": "canonical-juju"}, 

80 "title": "Integration test suite", 

81 "type": "page", 

82 "version": {"slug": "3.6"}, 

83 }, 

84 ] 

85} 

86 

87sample_topics = { 

88 "topics": [ 

89 { 

90 "category_id": 33, 

91 "excerpt": "The expander below has instructions>", 

92 "fancy_title": "Roadmap &amp; Releases", 

93 "id": 5064, 

94 "slug": "roadmap-releases", 

95 "tags": ["news"], 

96 "title": "Roadmap & Releases", 

97 }, 

98 { 

99 "category_id": 6, 

100 "fancy_title": "Juju 2.9.0 Release Notes", 

101 "id": 4525, 

102 "slug": "juju-2-9-0-release-notes", 

103 "tags": ["news"], 

104 "title": "Juju 2.9.0 Release Notes", 

105 }, 

106 { 

107 "category_id": 6, 

108 "fancy_title": "ceph-radosgw unit stuck in blocked state", 

109 "id": 3357, 

110 "slug": "ceph-radosgw-unit-stuck-in-blocked-state", 

111 "tags": [], 

112 "title": "ceph-radosgw unit stuck in blocked state", 

113 }, 

114 { 

115 "category_id": 6, 

116 "fancy_title": "Juju units;", 

117 "id": 6693, 

118 "slug": "juju-units-die-with", 

119 "tags": ["question"], 

120 "title": "Juju units die", 

121 }, 

122 { 

123 "category_id": 41, 

124 "fancy_title": "Mysql-innodb-cluster", 

125 "id": 4803, 

126 "slug": "mysql-innodb-cluster-cluster-not-yet-created-by-leader", 

127 "tags": [], 

128 "title": "Mysql-innodb-cluster", 

129 }, 

130 ] 

131}