Skip to content
Snippets Groups Projects
README.md 2.83 KiB
Newer Older
Olivier Le Brouster's avatar
Olivier Le Brouster committed
initial fixtures
================

## News

If not precised, news have those default values :

* newsbox_slug                      : news-%(pk)d
* newsbox_title                     : News %(pk)d
* newsbox_date                      : 2014-02-22 10:00:00
* newsbox_publication_start_date    : 1985-07-02 10:00:00
* newsbox_published                 : True
* newsbox_summary                   : Summary of the news %(pk)d
* newsbox_body                      : Body of the news %(pk)d

### List of all available test News

1. A basic classic published news 
2. A not published news via newsbox_published
 * newsbox_published = False
3. A not published news via newsbox_publication_start_date
 * newsbox_publication_start_date = 2020-01-01 10:00:00
4. A published news without body
 * newsbox_body = ''
5. A not published news via newsbox_published (same as #2)
 * newsbox_published = False
6. A published news about an old event
 * newsbox_date = 2005-07-15 10:00:00
7. A published news about a future event
 * newsbox_date = 2020-01-01 10:00:00

## NewsExpired

If not precised, Expired news have default values from news for classic news 
fields and those values for specific Expired news fields :

* newsbox_publication_end_date      : 2014-02-22 10:00:00

### List of all available test NewsExpired

* from 1 to 4 : same as News
5. A not published news via his expiration's date
 * newsbox_publication_end_date = 2000-01-01 10:00:00
* from 6 to 7 : same as News

## NewsSEO

If not precised, SEO news have default values from news for classic news fields
and those values for specific SEO news fields :

* newsbox_indexed                   : True
* newsbox_meta_description          : Meta description of the news %(pk)d
* newsbox_meta_keywords             : keyword1, keyword2, news-%(pk)d

### List of all available test NewsExpired

* from 1 to 5 : same as News
6. same as #6 of News but not indexed news via newsbox_indexed
 * newsbox_indexed = False
7. same as #7 of News

## NewsComplete

If not precised, Complete news have default values from news for classic news 
fields, from NewsSEO for seo fields, from NewsExpired for expired fields.

### List of all available test NewsComplete

* from 1 to 5 : same as NewsExpired
6. Same as #6 of NewsSEO
7. same as #7 of News

## NewsExtended

If not precised, Complete news have default values from news for classic news 
fields, from NewsSEO for seo fields, from NewsExpired for expired fields and 
those values for specific NewsExtended news fields :

* general_field                     : Test
* content_field                     : Extra content of the news %(pk)d
* seo_field                         : Extra SEO of the news %(pk)d

### List of all available test NewsExtended

* from 1 to 7 : same as NewsComplete

## Code used to generate test news

You can see the code used to generate initial fixtures in utils.py in this 
directory.