def test_log_with_valid_fields():
    entry = Entry()
    entry.content = "content is all there is"
    entry.save()

    log_entry = LogEntry()
    log_entry.entry_type = "log"
    log_entry.entry = entry
    entry.save()
Exemple #2
0
def test_log_with_valid_fields():
    entry = Entry()
    entry.content = 'content is all there is'
    entry.save()

    log_entry = LogEntry()
    log_entry.entry_type = 'log'
    log_entry.entry = entry
    entry.save()
def test_save_log_entry_with_content():
    entry = Entry()
    entry.content = 'content is all there is'
    entry.save()

    log_entry = LogEntry()
    log_entry.entry_type = 'log'
    log_entry.entry = entry
    log_entry.save()

    from_db = LogEntry.objects(id=log_entry.id).get()
    assert from_db.entry.content == 'content is all there is'
    assert from_db.entry_type == 'log'
Exemple #4
0
def test_save_log_entry_with_content():
    entry = Entry()
    entry.content = 'content is all there is'
    entry.save()

    log_entry = LogEntry()
    log_entry.entry_type = 'log'
    log_entry.entry = entry
    log_entry.save()

    from_db = LogEntry.objects(id=log_entry.id).get()
    assert from_db.entry.content == 'content is all there is'
    assert from_db.entry_type == 'log'