django-cms-mycmsproject-toporojo / hvad / test_utils / data.py

# -*- coding: utf-8 -*-
from datetime import datetime
    
DOUBLE_NORMAL = {
    1: {
        'shared_field': u'Shared1',
        'translated_field_en': u'English1',
        'translated_field_ja': u'日本語一',
    },
    2: {
        'shared_field': u'Shared2',
        'translated_field_en': u'English2',
        'translated_field_ja': u'日本語二',
    },
}

D1 = datetime(year=1988, month=7, day=4)
D2 = datetime(year=2011, month=1, day=26)
D3 = datetime(year=2011, month=2, day=16, hour=5, minute=1, second=14)

DATES = {
    1: {
        'shared_date': D1, 
        'translated_date_en': D3,
        'translated_date_ja': D2,
    },
    2: {
        'shared_date': D3, 
        'translated_date_en': D2,
        'translated_date_ja': D1,
    },
    3: {
        'shared_date': D2, 
        'translated_date_en': D1,
        'translated_date_ja': D3,
    },
}

DATES_REVERSED = {}
for pk, data in DATES.items():
    for key, value in data.items():
        if value not in DATES_REVERSED:
            DATES_REVERSED[value] = {}
        DATES_REVERSED[value][key] = pk
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.