Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
Fixed presentation fixture and while loop usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Romansky committed Oct 10, 2014
1 parent 8531be0 commit d458561
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/freeseer/tests/framework/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,19 @@ def db(tmpdir):

@pytest.fixture
def presentation():
title = 'MITM presentation attacks'
speaker = 'Alice and Eve'
description = 'Field survey of current MITM presentation attacks.'
category = 'Security category'
event = 'testing event'
room = '1300'
today = QDate.currentDate() # Today.
date = today.toString(1) # format date yyyy-mm-dd
current_time = QTime.currentTime() # hh:mm:ss
startTime = current_time.addSecs(60 * 5).toString() # Start in 5 minutes
endTime = current_time.addSecs(60 * 10).toString() # End time in 10 minutes
presentation = Presentation(title, speaker, description, category, event,
room, date, startTime, endTime)
return presentation
return Presentation(
title = 'MITM presentation attacks',
speaker = 'Alice and Eve',
description = 'Field survey of current MITM presentation attacks.',
category = 'Security category',
event = 'testing event',
room = '1300',
date = today.toString(1), # format date yyyy-mm-dd
startTime = current_time.addSecs(60 * 5).toString(), # Start in 5 minutes
endTime = current_time.addSecs(60 * 10).toString() # End time in 10 minutes
)


def test_first_talk_id(db, presentation):
Expand Down Expand Up @@ -181,7 +180,7 @@ def test_get_talk_ids(db, presentation):

talk_ids = db.get_talk_ids()
talk_id_count = 0
while(talk_ids.next()):
while talk_ids.next():
talk_id_count += 1
assert talk_id_count == 1

Expand Down

0 comments on commit d458561

Please sign in to comment.