def test_find_player_with_html_quotes(notes): assert notes.get_note('"htmlchar"') == _Note( player='"htmlchar"', label='GENERAL', update=datetime(2013, 8, 14, 15, 14, 49, tzinfo=UTC), text='UTG limp AA' ) with pytest.raises(NoteNotFoundError): assert notes.get_note('"htmlchar"')
def test_find_player_with_html_quotes(notes): assert notes.get_note('"htmlchar"') == _Note( player='"htmlchar"', label="GENERAL", update=datetime(2013, 8, 14, 15, 14, 49, tzinfo=UTC), text="UTG limp AA", ) with pytest.raises(NoteNotFoundError): assert notes.get_note(""htmlchar"")
def test_all_notes(notes): assert notes.notes == (_Note(player='regplayer', label='FISH', text='river big bet 99', update=datetime(2013, 12, 13, 17, 6, 35, tzinfo=UTC)), _Note(player='sharkplayer', label='SHARK', text='plays GTO', update=datetime(2014, 9, 14, 19, 20, 49, tzinfo=UTC)), _Note(player='fishplayer', label='REG', text='4-way check-miniraise draw', update=datetime(2013, 12, 13, 17, 23, 6, tzinfo=UTC)), _Note(player='"htmlchar"', label='GENERAL', text='UTG limp AA', update=datetime(2013, 8, 14, 15, 14, 49, tzinfo=UTC)), _Note(player='$dollarsign', label='REG', text='not very good', update=datetime(2013, 2, 7, 18, 35, 39, tzinfo=UTC)), _Note(player='nonoteforplayer', label=None, text='not note', update=datetime(2013, 2, 7, 18, 35, 39, tzinfo=UTC)), _Note(player='-=strangename=-', label=None, text='DONK-CALL TP', update=datetime(2010, 9, 15, 15, 56, 20, tzinfo=UTC)), _Note(player='//ÄMGS', label=None, text='unicode chars in name', update=datetime(2011, 6, 26, 13, 14, 58, tzinfo=UTC)), _Note(player='0bullmarket0', label=None, text='multiple\nlines\nin the\nnote', update=datetime(2010, 3, 23, 2, 36, 50, tzinfo=UTC)), _Note(player='CarlGardner', label=None, text='contains invalid character: 3B 57s ', update=datetime(2010, 8, 15, 10, 59, 15, tzinfo=UTC)), _Note(player='µ (x+t)', label=None, text='µ (x+t): strange chars everywhere', update=datetime(2010, 3, 24, 5, 34, 14, tzinfo=UTC)))
def test_all_notes(notes): assert notes.notes == ( _Note( player="regplayer", label="FISH", text="river big bet 99", update=datetime(2013, 12, 13, 17, 6, 35, tzinfo=UTC), ), _Note( player="sharkplayer", label="SHARK", text="plays GTO", update=datetime(2014, 9, 14, 19, 20, 49, tzinfo=UTC), ), _Note( player="fishplayer", label="REG", text="4-way check-miniraise draw", update=datetime(2013, 12, 13, 17, 23, 6, tzinfo=UTC), ), _Note( player='"htmlchar"', label="GENERAL", text="UTG limp AA", update=datetime(2013, 8, 14, 15, 14, 49, tzinfo=UTC), ), _Note( player="$dollarsign", label="REG", text="not very good", update=datetime(2013, 2, 7, 18, 35, 39, tzinfo=UTC), ), _Note( player="nonoteforplayer", label=None, text="not note", update=datetime(2013, 2, 7, 18, 35, 39, tzinfo=UTC), ), _Note( player="-=strangename=-", label=None, text="DONK-CALL TP", update=datetime(2010, 9, 15, 15, 56, 20, tzinfo=UTC), ), _Note( player="//ÄMGS", label=None, text="unicode chars in name", update=datetime(2011, 6, 26, 13, 14, 58, tzinfo=UTC), ), _Note( player="0bullmarket0", label=None, text="multiple\nlines\nin the\nnote", update=datetime(2010, 3, 23, 2, 36, 50, tzinfo=UTC), ), _Note( player="CarlGardner", label=None, text="contains invalid character: 3B 57s ", update=datetime(2010, 8, 15, 10, 59, 15, tzinfo=UTC), ), _Note( player="µ (x+t)", label=None, text="µ (x+t): strange chars everywhere", update=datetime(2010, 3, 24, 5, 34, 14, tzinfo=UTC), ), )
def test_all_notes(notes): assert notes.notes == ( _Note(player='regplayer', label='FISH', text='river big bet 99', update=datetime(2013, 12, 13, 17, 6, 35, tzinfo=UTC)), _Note(player='sharkplayer', label='SHARK', text='plays GTO', update=datetime(2014, 9, 14, 19, 20, 49, tzinfo=UTC)), _Note(player='fishplayer', label='REG', text='4-way check-miniraise draw', update=datetime(2013, 12, 13, 17, 23, 6, tzinfo=UTC)), _Note(player='"htmlchar"', label='GENERAL', text='UTG limp AA', update=datetime(2013, 8, 14, 15, 14, 49, tzinfo=UTC)), _Note(player='$dollarsign', label='REG', text='not very good', update=datetime(2013, 2, 7, 18, 35, 39, tzinfo=UTC)), _Note(player='nonoteforplayer', label=None, text='not note', update=datetime(2013, 2, 7, 18, 35, 39, tzinfo=UTC)), _Note(player='-=strangename=-', label=None, text='DONK-CALL TP', update=datetime(2010, 9, 15, 15, 56, 20, tzinfo=UTC)), _Note(player='//ÄMGS', label=None, text='unicode chars in name', update=datetime(2011, 6, 26, 13, 14, 58, tzinfo=UTC)), _Note(player='0bullmarket0', label=None, text='multiple\nlines\nin the\nnote', update=datetime(2010, 3, 23, 2, 36, 50, tzinfo=UTC)), _Note(player='CarlGardner', label=None, text='contains invalid character: 3B 57s ', update=datetime(2010, 8, 15, 10, 59, 15, tzinfo=UTC)), _Note(player='µ (x+t)', label=None, text='µ (x+t): strange chars everywhere', update=datetime(2010, 3, 24, 5, 34, 14, tzinfo=UTC)) )