-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Toomore Chiang <[email protected]>
- Loading branch information
Showing
8 changed files
with
330 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
log_cli = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
''' Test Pretalx ''' | ||
import logging | ||
|
||
import pytest | ||
|
||
from toldwords.pretalx import Pretalx | ||
|
||
logging.basicConfig( | ||
filename='test.log', | ||
filemode='w', | ||
level=logging.ERROR, | ||
format='%(asctime)s - %(levelname)s: %(message)s', | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def auth_info(): | ||
''' Get login info ''' | ||
return Pretalx(domain='pretalx.coscup.org', event='coscup-2024', | ||
token='') | ||
|
||
|
||
class TestPretalx: | ||
''' Test Pretalx ''' | ||
|
||
@staticmethod | ||
def test_fetch_all(auth_info): | ||
''' Test fetch all ''' | ||
pretalx = auth_info | ||
|
||
datas = list(pretalx.submissions()) | ||
|
||
logging.info(datas) | ||
logging.info(len(datas)) | ||
|
||
@staticmethod | ||
def test_rooms(auth_info): | ||
''' Test rooms ''' | ||
pretalx = auth_info | ||
|
||
datas = list(pretalx.rooms()) | ||
|
||
logging.info(datas) | ||
logging.info(len(datas)) | ||
|
||
@staticmethod | ||
def test_speakers(auth_info): | ||
''' Test speakers ''' | ||
pretalx = auth_info | ||
|
||
datas = list(pretalx.speakers()) | ||
|
||
logging.info(datas) | ||
logging.info(len(datas)) | ||
|
||
@staticmethod | ||
def test_talks(auth_info): | ||
''' Test talks''' | ||
pretalx = auth_info | ||
|
||
datas = list(pretalx.talks()) | ||
|
||
logging.info(datas) | ||
logging.info(len(datas)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters