def test_feedback_with_valid_fields():
    entry = Entry()
    entry.requested_from = '*****@*****.**'
    entry.requested_by = '*****@*****.**'
    entry.details = 'details'
    entry.share_objectives = True
    entry.sent = True
    entry.replied = True
    entry.save()

    log_entry = LogEntry()
    log_entry.entry_type = 'feedback'
    log_entry.entry = entry
    log_entry.save()
示例#2
0
def test_feedback_with_valid_fields():
    entry = Entry()
    entry.requested_from = '*****@*****.**'
    entry.requested_by = '*****@*****.**'
    entry.details = 'details'
    entry.share_objectives = True
    entry.sent = True
    entry.replied = True
    entry.save()

    log_entry = LogEntry()
    log_entry.entry_type = 'feedback'
    log_entry.entry = entry
    log_entry.save()
def test_save_log_entry_with_feedback():
    entry = Entry()
    entry.requested_from = '*****@*****.**'
    entry.requested_by = '*****@*****.**'
    entry.details = 'details'
    entry.share_objectives = True
    entry.sent = True
    entry.replied = True
    entry.save()

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

    from_db = LogEntry.objects(id=log_entry.id).get()
    assert from_db.entry_type == 'feedback'
    assert from_db.entry.requested_from == '*****@*****.**'
    assert from_db.entry.requested_by == '*****@*****.**'
    assert from_db.entry.details == 'details'
    assert from_db.entry.share_objectives
    assert from_db.entry.sent
    assert from_db.entry.replied
示例#4
0
def test_save_log_entry_with_feedback():
    entry = Entry()
    entry.requested_from = '*****@*****.**'
    entry.requested_by = '*****@*****.**'
    entry.details = 'details'
    entry.share_objectives = True
    entry.sent = True
    entry.replied = True
    entry.save()

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

    from_db = LogEntry.objects(id=log_entry.id).get()
    assert from_db.entry_type == 'feedback'
    assert from_db.entry.requested_from == '*****@*****.**'
    assert from_db.entry.requested_by == '*****@*****.**'
    assert from_db.entry.details == 'details'
    assert from_db.entry.share_objectives
    assert from_db.entry.sent
    assert from_db.entry.replied