Commit 82344a24126a7e3b4e062171f8915d53bc5d209a

Authored by Macartur Sousa
1 parent 2b823aec
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

Fixed tests and added tests/plugin.d/spb.py

Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
colab_spb/fixtures/colab_spb.json 0 → 100644
@@ -0,0 +1,383 @@ @@ -0,0 +1,383 @@
  1 +[
  2 +{
  3 + "fields": {
  4 + "logo": "",
  5 + "description": "",
  6 + "last_imported_index": 0,
  7 + "name": "ListA",
  8 + "email": "listA@example.com"
  9 + },
  10 + "model": "super_archives.mailinglist",
  11 + "pk": 1
  12 +},
  13 +{
  14 + "fields": {
  15 + "logo": "",
  16 + "description": "",
  17 + "last_imported_index": 0,
  18 + "name": "ListB",
  19 + "email": "listB@example.com"
  20 + },
  21 + "model": "super_archives.mailinglist",
  22 + "pk": 2
  23 +},
  24 +{
  25 + "fields": {
  26 + "logo": "",
  27 + "description": "",
  28 + "last_imported_index": 0,
  29 + "name": "ListC",
  30 + "email": "listC@example.com"
  31 + },
  32 + "model": "super_archives.mailinglist",
  33 + "pk": 3
  34 +},
  35 +{
  36 + "fields": {
  37 + "spam": false,
  38 + "subject_token": "Thread_1_on_List_A",
  39 + "mailinglist": 1,
  40 + "score": 31,
  41 + "latest_message": 3
  42 + },
  43 + "model": "super_archives.thread",
  44 + "pk": 1
  45 +},
  46 +{
  47 + "fields": {
  48 + "spam": false,
  49 + "subject_token": "Thread_1_on_List_B",
  50 + "mailinglist": 2,
  51 + "score": 0,
  52 + "latest_message": 4
  53 + },
  54 + "model": "super_archives.thread",
  55 + "pk": 3
  56 +},
  57 +{
  58 + "fields": {
  59 + "spam": false,
  60 + "subject_token": "Thread_1_on_List_C",
  61 + "mailinglist": 3,
  62 + "score": 0,
  63 + "latest_message": 5
  64 + },
  65 + "model": "super_archives.thread",
  66 + "pk": 4
  67 +},
  68 +{
  69 + "fields": {
  70 + "spam": false,
  71 + "subject_token": "Thread_2_on_List_A",
  72 + "mailinglist": 1,
  73 + "score": 0,
  74 + "latest_message": 6
  75 + },
  76 + "model": "super_archives.thread",
  77 + "pk": 5
  78 +},
  79 +{
  80 + "fields": {
  81 + "spam": false,
  82 + "subject_token": "Thread_3_on_List_A",
  83 + "mailinglist": 1,
  84 + "score": 0,
  85 + "latest_message": 7
  86 + },
  87 + "model": "super_archives.thread",
  88 + "pk": 6
  89 +},
  90 +{
  91 + "fields": {
  92 + "spam": false,
  93 + "subject_token": "Thread_4_on_List_A",
  94 + "mailinglist": 1,
  95 + "score": 0,
  96 + "latest_message": 8
  97 + },
  98 + "model": "super_archives.thread",
  99 + "pk": 7
  100 +},
  101 +{
  102 + "fields": {
  103 + "spam": false,
  104 + "subject_token": "Thread_5_on_List_A",
  105 + "mailinglist": 1,
  106 + "score": 0,
  107 + "latest_message": 9
  108 + },
  109 + "model": "super_archives.thread",
  110 + "pk": 8
  111 +},
  112 +{
  113 + "fields": {
  114 + "spam": false,
  115 + "subject_token": "Thread_6_on_List_A",
  116 + "mailinglist": 1,
  117 + "score": 0,
  118 + "latest_message": 10
  119 + },
  120 + "model": "super_archives.thread",
  121 + "pk": 9
  122 +},
  123 +{
  124 + "fields": {
  125 + "spam": false,
  126 + "subject_token": "Thread_7_on_List_A",
  127 + "mailinglist": 1,
  128 + "score": 0,
  129 + "latest_message": 11
  130 + },
  131 + "model": "super_archives.thread",
  132 + "pk": 10
  133 +},
  134 +{
  135 + "fields": {
  136 + "spam": false,
  137 + "subject_token": "Thread_8_on_List_A",
  138 + "mailinglist": 1,
  139 + "score": 0,
  140 + "latest_message": 12
  141 + },
  142 + "model": "super_archives.thread",
  143 + "pk": 11
  144 +},
  145 +{
  146 + "fields": {
  147 + "body": "This is a repply to Thread 1 on list A",
  148 + "received_time": "2015-01-28T12:43:00.752Z",
  149 + "from_address": 1,
  150 + "thread": 1,
  151 + "spam": false,
  152 + "subject_clean": "Response to Thread 1A",
  153 + "message_id": "mt1a",
  154 + "subject": "Response to Thread 1A"
  155 + },
  156 + "model": "super_archives.message",
  157 + "pk": 3
  158 +},
  159 +{
  160 + "fields": {
  161 + "body": "This is a repply to Thread 2 on list A",
  162 + "received_time": "2015-01-28T12:43:00.752Z",
  163 + "from_address": 1,
  164 + "thread": 5,
  165 + "spam": false,
  166 + "subject_clean": "Response to Thread 2A",
  167 + "message_id": "mt2a",
  168 + "subject": "Response to Thread 2A"
  169 + },
  170 + "model": "super_archives.message",
  171 + "pk": 6
  172 +},
  173 +{
  174 + "fields": {
  175 + "body": "This is a repply to Thread 3 on list A",
  176 + "received_time": "2015-01-28T12:43:00.752Z",
  177 + "from_address": 1,
  178 + "thread": 6,
  179 + "spam": false,
  180 + "subject_clean": "Response to Thread 3A",
  181 + "message_id": "mt3a",
  182 + "subject": "Response to Thread 3A"
  183 + },
  184 + "model": "super_archives.message",
  185 + "pk": 7
  186 +},
  187 +{
  188 + "fields": {
  189 + "body": "This is a repply to Thread 4 on list A",
  190 + "received_time": "2015-01-28T12:43:00.752Z",
  191 + "from_address": 1,
  192 + "thread": 7,
  193 + "spam": false,
  194 + "subject_clean": "Response to Thread 4A",
  195 + "message_id": "mt4a",
  196 + "subject": "Response to Thread 4A"
  197 + },
  198 + "model": "super_archives.message",
  199 + "pk": 8
  200 +},
  201 +{
  202 + "fields": {
  203 + "body": "This is a repply to Thread 5 on list A",
  204 + "received_time": "2015-01-28T12:43:00.752Z",
  205 + "from_address": 1,
  206 + "thread": 8,
  207 + "spam": false,
  208 + "subject_clean": "Response to Thread 5A",
  209 + "message_id": "mt5a",
  210 + "subject": "Response to Thread 5A"
  211 + },
  212 + "model": "super_archives.message",
  213 + "pk": 9
  214 +},
  215 +{
  216 + "fields": {
  217 + "body": "This is a repply to Thread 6 on list A",
  218 + "received_time": "2015-01-28T12:43:00.752Z",
  219 + "from_address": 1,
  220 + "thread": 9,
  221 + "spam": false,
  222 + "subject_clean": "Response to Thread 6A",
  223 + "message_id": "mt6a",
  224 + "subject": "Response to Thread 6A"
  225 + },
  226 + "model": "super_archives.message",
  227 + "pk": 10
  228 +},
  229 +{
  230 + "fields": {
  231 + "body": "This is a repply to Thread 7 on list A",
  232 + "received_time": "2015-01-28T12:43:00.752Z",
  233 + "from_address": 1,
  234 + "thread": 10,
  235 + "spam": false,
  236 + "subject_clean": "Response to Thread 7A",
  237 + "message_id": "mt7a",
  238 + "subject": "Response to Thread 7A"
  239 + },
  240 + "model": "super_archives.message",
  241 + "pk": 11
  242 +},
  243 +{
  244 + "fields": {
  245 + "body": "This is a repply to Thread 8 on list A",
  246 + "received_time": "2015-01-28T12:43:00.752Z",
  247 + "from_address": 1,
  248 + "thread": 11,
  249 + "spam": false,
  250 + "subject_clean": "Response to Thread 8A",
  251 + "message_id": "mt8a",
  252 + "subject": "Response to Thread 8A"
  253 + },
  254 + "model": "super_archives.message",
  255 + "pk": 12
  256 +},
  257 +{
  258 + "fields": {
  259 + "body": "This is a repply to Thread 1 on list B",
  260 + "received_time": "2015-01-28T12:57:22.180Z",
  261 + "from_address": 1,
  262 + "thread": 3,
  263 + "spam": false,
  264 + "subject_clean": "Message 1 on Thread 1B",
  265 + "message_id": "",
  266 + "subject": "Message 1 on Thread 1B"
  267 + },
  268 + "model": "super_archives.message",
  269 + "pk": 4
  270 +},
  271 +{
  272 + "fields": {
  273 + "body": "This is a repply to Thread 1 on list C",
  274 + "received_time": "2015-01-28T13:02:12.903Z",
  275 + "from_address": 1,
  276 + "thread": 4,
  277 + "spam": false,
  278 + "subject_clean": "Message 1 on Thread 1C",
  279 + "message_id": "",
  280 + "subject": "Message 1 on Thread 1C"
  281 + },
  282 + "model": "super_archives.message",
  283 + "pk": 5
  284 +},
  285 +{
  286 + "fields": {
  287 + "last_name": "Administrator",
  288 + "webpage": "",
  289 + "twitter": "",
  290 + "is_staff": true,
  291 + "user_permissions": [],
  292 + "date_joined": "2015-01-28T12:34:58.770Z",
  293 + "google_talk": "",
  294 + "first_name": "Admin",
  295 + "is_superuser": true,
  296 + "last_login": "2015-01-28T12:35:39.621Z",
  297 + "verification_hash": null,
  298 + "role": "",
  299 + "email": "admin@mail.com",
  300 + "username": "admin",
  301 + "bio": "",
  302 + "needs_update": true,
  303 + "is_active": true,
  304 + "facebook": "",
  305 + "groups": [],
  306 + "password": "pbkdf2_sha256$12000$iiKCMnLZnFJw$UTx89LB8oYTiw9UqkcglzFLmIaZtbr+ZzF1cG3vfcyo=",
  307 + "institution": "",
  308 + "github": "",
  309 + "modified": "2015-01-28T12:45:27.375Z"
  310 + },
  311 + "model": "accounts.user",
  312 + "pk": 1
  313 +},
  314 +{
  315 + "fields": {
  316 + "last_name": "Norris",
  317 + "webpage": "",
  318 + "twitter": "",
  319 + "is_staff": true,
  320 + "user_permissions": [],
  321 + "date_joined": "2015-01-28T12:34:58.770Z",
  322 + "google_talk": "",
  323 + "first_name": "Chuck",
  324 + "is_superuser": true,
  325 + "last_login": "2015-01-28T12:35:39.621Z",
  326 + "verification_hash": null,
  327 + "role": "",
  328 + "email": "chucknorris@mail.com",
  329 + "username": "chucknorris",
  330 + "bio": "",
  331 + "needs_update": true,
  332 + "is_active": true,
  333 + "facebook": "",
  334 + "groups": [],
  335 + "password": "pbkdf2_sha256$12000$iiKCMnLZnFJw$UTx89LB8oYTiw9UqkcglzFLmIaZtbr+ZzF1cG3vfcyo=",
  336 + "institution": "",
  337 + "github": "",
  338 + "modified": "2015-01-28T12:45:27.375Z"
  339 + },
  340 + "model": "accounts.user",
  341 + "pk": 2
  342 +},
  343 +
  344 +{
  345 + "fields": {
  346 + "last_name": "Norris",
  347 + "webpage": "",
  348 + "twitter": "",
  349 + "is_staff": true,
  350 + "user_permissions": [],
  351 + "date_joined": "2015-01-28T12:34:58.770Z",
  352 + "google_talk": "",
  353 + "first_name": "Heisenberg",
  354 + "is_superuser": true,
  355 + "last_login": "2015-01-28T12:35:39.621Z",
  356 + "verification_hash": null,
  357 + "role": "",
  358 + "email": "heisenberg@mail.com",
  359 + "username": "heisenbergnorris",
  360 + "bio": "",
  361 + "needs_update": true,
  362 + "is_active": true,
  363 + "facebook": "",
  364 + "groups": [],
  365 + "password": "pbkdf2_sha256$12000$iiKCMnLZnFJw$UTx89LB8oYTiw9UqkcglzFLmIaZtbr+ZzF1cG3vfcyo=",
  366 + "institution": "",
  367 + "github": "",
  368 + "modified": "2015-01-28T12:45:27.375Z"
  369 + },
  370 + "model": "accounts.user",
  371 + "pk": 3
  372 +},
  373 +{
  374 + "fields": {
  375 + "real_name": "Administrator",
  376 + "user": 1,
  377 + "md5": "edb0e96701c209ab4b50211c856c50c4",
  378 + "address": "admin@mail.com"
  379 + },
  380 + "model": "super_archives.emailaddress",
  381 + "pk": 1
  382 +}
  383 +]
colab_spb/fixtures/test_colab_spb.json
@@ -1,383 +0,0 @@ @@ -1,383 +0,0 @@
1 -[  
2 -{  
3 - "fields": {  
4 - "logo": "",  
5 - "description": "",  
6 - "last_imported_index": 0,  
7 - "name": "ListA",  
8 - "email": "listA@example.com"  
9 - },  
10 - "model": "super_archives.mailinglist",  
11 - "pk": 1  
12 -},  
13 -{  
14 - "fields": {  
15 - "logo": "",  
16 - "description": "",  
17 - "last_imported_index": 0,  
18 - "name": "ListB",  
19 - "email": "listB@example.com"  
20 - },  
21 - "model": "super_archives.mailinglist",  
22 - "pk": 2  
23 -},  
24 -{  
25 - "fields": {  
26 - "logo": "",  
27 - "description": "",  
28 - "last_imported_index": 0,  
29 - "name": "ListC",  
30 - "email": "listC@example.com"  
31 - },  
32 - "model": "super_archives.mailinglist",  
33 - "pk": 3  
34 -},  
35 -{  
36 - "fields": {  
37 - "spam": false,  
38 - "subject_token": "Thread_1_on_List_A",  
39 - "mailinglist": 1,  
40 - "score": 31,  
41 - "latest_message": 3  
42 - },  
43 - "model": "super_archives.thread",  
44 - "pk": 1  
45 -},  
46 -{  
47 - "fields": {  
48 - "spam": false,  
49 - "subject_token": "Thread_1_on_List_B",  
50 - "mailinglist": 2,  
51 - "score": 0,  
52 - "latest_message": 4  
53 - },  
54 - "model": "super_archives.thread",  
55 - "pk": 3  
56 -},  
57 -{  
58 - "fields": {  
59 - "spam": false,  
60 - "subject_token": "Thread_1_on_List_C",  
61 - "mailinglist": 3,  
62 - "score": 0,  
63 - "latest_message": 5  
64 - },  
65 - "model": "super_archives.thread",  
66 - "pk": 4  
67 -},  
68 -{  
69 - "fields": {  
70 - "spam": false,  
71 - "subject_token": "Thread_2_on_List_A",  
72 - "mailinglist": 1,  
73 - "score": 0,  
74 - "latest_message": 6  
75 - },  
76 - "model": "super_archives.thread",  
77 - "pk": 5  
78 -},  
79 -{  
80 - "fields": {  
81 - "spam": false,  
82 - "subject_token": "Thread_3_on_List_A",  
83 - "mailinglist": 1,  
84 - "score": 0,  
85 - "latest_message": 7  
86 - },  
87 - "model": "super_archives.thread",  
88 - "pk": 6  
89 -},  
90 -{  
91 - "fields": {  
92 - "spam": false,  
93 - "subject_token": "Thread_4_on_List_A",  
94 - "mailinglist": 1,  
95 - "score": 0,  
96 - "latest_message": 8  
97 - },  
98 - "model": "super_archives.thread",  
99 - "pk": 7  
100 -},  
101 -{  
102 - "fields": {  
103 - "spam": false,  
104 - "subject_token": "Thread_5_on_List_A",  
105 - "mailinglist": 1,  
106 - "score": 0,  
107 - "latest_message": 9  
108 - },  
109 - "model": "super_archives.thread",  
110 - "pk": 8  
111 -},  
112 -{  
113 - "fields": {  
114 - "spam": false,  
115 - "subject_token": "Thread_6_on_List_A",  
116 - "mailinglist": 1,  
117 - "score": 0,  
118 - "latest_message": 10  
119 - },  
120 - "model": "super_archives.thread",  
121 - "pk": 9  
122 -},  
123 -{  
124 - "fields": {  
125 - "spam": false,  
126 - "subject_token": "Thread_7_on_List_A",  
127 - "mailinglist": 1,  
128 - "score": 0,  
129 - "latest_message": 11  
130 - },  
131 - "model": "super_archives.thread",  
132 - "pk": 10  
133 -},  
134 -{  
135 - "fields": {  
136 - "spam": false,  
137 - "subject_token": "Thread_8_on_List_A",  
138 - "mailinglist": 1,  
139 - "score": 0,  
140 - "latest_message": 12  
141 - },  
142 - "model": "super_archives.thread",  
143 - "pk": 11  
144 -},  
145 -{  
146 - "fields": {  
147 - "body": "This is a repply to Thread 1 on list A",  
148 - "received_time": "2015-01-28T12:43:00.752Z",  
149 - "from_address": 1,  
150 - "thread": 1,  
151 - "spam": false,  
152 - "subject_clean": "Response to Thread 1A",  
153 - "message_id": "mt1a",  
154 - "subject": "Response to Thread 1A"  
155 - },  
156 - "model": "super_archives.message",  
157 - "pk": 3  
158 -},  
159 -{  
160 - "fields": {  
161 - "body": "This is a repply to Thread 2 on list A",  
162 - "received_time": "2015-01-28T12:43:00.752Z",  
163 - "from_address": 1,  
164 - "thread": 5,  
165 - "spam": false,  
166 - "subject_clean": "Response to Thread 2A",  
167 - "message_id": "mt2a",  
168 - "subject": "Response to Thread 2A"  
169 - },  
170 - "model": "super_archives.message",  
171 - "pk": 6  
172 -},  
173 -{  
174 - "fields": {  
175 - "body": "This is a repply to Thread 3 on list A",  
176 - "received_time": "2015-01-28T12:43:00.752Z",  
177 - "from_address": 1,  
178 - "thread": 6,  
179 - "spam": false,  
180 - "subject_clean": "Response to Thread 3A",  
181 - "message_id": "mt3a",  
182 - "subject": "Response to Thread 3A"  
183 - },  
184 - "model": "super_archives.message",  
185 - "pk": 7  
186 -},  
187 -{  
188 - "fields": {  
189 - "body": "This is a repply to Thread 4 on list A",  
190 - "received_time": "2015-01-28T12:43:00.752Z",  
191 - "from_address": 1,  
192 - "thread": 7,  
193 - "spam": false,  
194 - "subject_clean": "Response to Thread 4A",  
195 - "message_id": "mt4a",  
196 - "subject": "Response to Thread 4A"  
197 - },  
198 - "model": "super_archives.message",  
199 - "pk": 8  
200 -},  
201 -{  
202 - "fields": {  
203 - "body": "This is a repply to Thread 5 on list A",  
204 - "received_time": "2015-01-28T12:43:00.752Z",  
205 - "from_address": 1,  
206 - "thread": 8,  
207 - "spam": false,  
208 - "subject_clean": "Response to Thread 5A",  
209 - "message_id": "mt5a",  
210 - "subject": "Response to Thread 5A"  
211 - },  
212 - "model": "super_archives.message",  
213 - "pk": 9  
214 -},  
215 -{  
216 - "fields": {  
217 - "body": "This is a repply to Thread 6 on list A",  
218 - "received_time": "2015-01-28T12:43:00.752Z",  
219 - "from_address": 1,  
220 - "thread": 9,  
221 - "spam": false,  
222 - "subject_clean": "Response to Thread 6A",  
223 - "message_id": "mt6a",  
224 - "subject": "Response to Thread 6A"  
225 - },  
226 - "model": "super_archives.message",  
227 - "pk": 10  
228 -},  
229 -{  
230 - "fields": {  
231 - "body": "This is a repply to Thread 7 on list A",  
232 - "received_time": "2015-01-28T12:43:00.752Z",  
233 - "from_address": 1,  
234 - "thread": 10,  
235 - "spam": false,  
236 - "subject_clean": "Response to Thread 7A",  
237 - "message_id": "mt7a",  
238 - "subject": "Response to Thread 7A"  
239 - },  
240 - "model": "super_archives.message",  
241 - "pk": 11  
242 -},  
243 -{  
244 - "fields": {  
245 - "body": "This is a repply to Thread 8 on list A",  
246 - "received_time": "2015-01-28T12:43:00.752Z",  
247 - "from_address": 1,  
248 - "thread": 11,  
249 - "spam": false,  
250 - "subject_clean": "Response to Thread 8A",  
251 - "message_id": "mt8a",  
252 - "subject": "Response to Thread 8A"  
253 - },  
254 - "model": "super_archives.message",  
255 - "pk": 12  
256 -},  
257 -{  
258 - "fields": {  
259 - "body": "This is a repply to Thread 1 on list B",  
260 - "received_time": "2015-01-28T12:57:22.180Z",  
261 - "from_address": 1,  
262 - "thread": 3,  
263 - "spam": false,  
264 - "subject_clean": "Message 1 on Thread 1B",  
265 - "message_id": "",  
266 - "subject": "Message 1 on Thread 1B"  
267 - },  
268 - "model": "super_archives.message",  
269 - "pk": 4  
270 -},  
271 -{  
272 - "fields": {  
273 - "body": "This is a repply to Thread 1 on list C",  
274 - "received_time": "2015-01-28T13:02:12.903Z",  
275 - "from_address": 1,  
276 - "thread": 4,  
277 - "spam": false,  
278 - "subject_clean": "Message 1 on Thread 1C",  
279 - "message_id": "",  
280 - "subject": "Message 1 on Thread 1C"  
281 - },  
282 - "model": "super_archives.message",  
283 - "pk": 5  
284 -},  
285 -{  
286 - "fields": {  
287 - "last_name": "Administrator",  
288 - "webpage": "",  
289 - "twitter": "",  
290 - "is_staff": true,  
291 - "user_permissions": [],  
292 - "date_joined": "2015-01-28T12:34:58.770Z",  
293 - "google_talk": "",  
294 - "first_name": "Admin",  
295 - "is_superuser": true,  
296 - "last_login": "2015-01-28T12:35:39.621Z",  
297 - "verification_hash": null,  
298 - "role": "",  
299 - "email": "admin@mail.com",  
300 - "username": "admin",  
301 - "bio": "",  
302 - "needs_update": true,  
303 - "is_active": true,  
304 - "facebook": "",  
305 - "groups": [],  
306 - "password": "pbkdf2_sha256$12000$iiKCMnLZnFJw$UTx89LB8oYTiw9UqkcglzFLmIaZtbr+ZzF1cG3vfcyo=",  
307 - "institution": "",  
308 - "github": "",  
309 - "modified": "2015-01-28T12:45:27.375Z"  
310 - },  
311 - "model": "accounts.user",  
312 - "pk": 1  
313 -},  
314 -{  
315 - "fields": {  
316 - "last_name": "Norris",  
317 - "webpage": "",  
318 - "twitter": "",  
319 - "is_staff": true,  
320 - "user_permissions": [],  
321 - "date_joined": "2015-01-28T12:34:58.770Z",  
322 - "google_talk": "",  
323 - "first_name": "Chuck",  
324 - "is_superuser": true,  
325 - "last_login": "2015-01-28T12:35:39.621Z",  
326 - "verification_hash": null,  
327 - "role": "",  
328 - "email": "chucknorris@mail.com",  
329 - "username": "chucknorris",  
330 - "bio": "",  
331 - "needs_update": true,  
332 - "is_active": true,  
333 - "facebook": "",  
334 - "groups": [],  
335 - "password": "pbkdf2_sha256$12000$iiKCMnLZnFJw$UTx89LB8oYTiw9UqkcglzFLmIaZtbr+ZzF1cG3vfcyo=",  
336 - "institution": "",  
337 - "github": "",  
338 - "modified": "2015-01-28T12:45:27.375Z"  
339 - },  
340 - "model": "accounts.user",  
341 - "pk": 2  
342 -},  
343 -  
344 -{  
345 - "fields": {  
346 - "last_name": "Norris",  
347 - "webpage": "",  
348 - "twitter": "",  
349 - "is_staff": true,  
350 - "user_permissions": [],  
351 - "date_joined": "2015-01-28T12:34:58.770Z",  
352 - "google_talk": "",  
353 - "first_name": "Heisenberg",  
354 - "is_superuser": true,  
355 - "last_login": "2015-01-28T12:35:39.621Z",  
356 - "verification_hash": null,  
357 - "role": "",  
358 - "email": "heisenberg@mail.com",  
359 - "username": "heisenbergnorris",  
360 - "bio": "",  
361 - "needs_update": true,  
362 - "is_active": true,  
363 - "facebook": "",  
364 - "groups": [],  
365 - "password": "pbkdf2_sha256$12000$iiKCMnLZnFJw$UTx89LB8oYTiw9UqkcglzFLmIaZtbr+ZzF1cG3vfcyo=",  
366 - "institution": "",  
367 - "github": "",  
368 - "modified": "2015-01-28T12:45:27.375Z"  
369 - },  
370 - "model": "accounts.user",  
371 - "pk": 3  
372 -},  
373 -{  
374 - "fields": {  
375 - "real_name": "Administrator",  
376 - "user": 1,  
377 - "md5": "edb0e96701c209ab4b50211c856c50c4",  
378 - "address": "admin@mail.com"  
379 - },  
380 - "model": "super_archives.emailaddress",  
381 - "pk": 1  
382 -}  
383 -]  
colab_spb/tests/test_get_list.py
1 from django.http import HttpResponsePermanentRedirect 1 from django.http import HttpResponsePermanentRedirect
2 from django.test import TestCase, Client 2 from django.test import TestCase, Client
3 3
  4 +from colab.super_archives.models import *
4 5
5 class ColabSPB(TestCase): 6 class ColabSPB(TestCase):
6 7
7 - fixtures = ['test_colab_spb.json'] 8 + fixtures = ['colab_spb.json']
8 9
9 def setUp(self): 10 def setUp(self):
10 super(ColabSPB, self).setUp() 11 super(ColabSPB, self).setUp()
@@ -25,3 +26,4 @@ class ColabSPB(TestCase): @@ -25,3 +26,4 @@ class ColabSPB(TestCase):
25 def test_getlist_default_MAX(self): 26 def test_getlist_default_MAX(self):
26 response = self.client.get("/spb/get_list/?list_name=ListA") 27 response = self.client.get("/spb/get_list/?list_name=ListA")
27 self.assertEqual(7,len(response.context[1]['latest'])) 28 self.assertEqual(7,len(response.context[1]['latest']))
  29 + pass
tests/plugins.d/spb.py
1 -from colab.plugins.utils.menu import colab_url_factory  
2 -  
3 -name = 'colab_spb'  
4 -verbose_name = 'Spb plugin'  
5 -  
6 -urls = {  
7 - 'include': 'colab_spb.urls',  
8 - 'namespace': 'spb',  
9 - 'prefix': 'spb',  
10 -}  
11 -  
12 -url = colab_url_factory("spb") 1 +from django.utils.translation import ugettext_lazy as _
  2 +from colab.plugins.utils.menu import colab_url_factory
  3 +
  4 +name = "colab_spb"
  5 +verbose_name = "SPB Plugin"
  6 +urls = {
  7 + "include":"colab_spb.urls",
  8 + "prefix": '^spb/',
  9 + "namespace":"colab_spb"
  10 + }
  11 +
  12 +url = colab_url_factory('colab_spb')