File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
ravendb/tests/jvm_migrated_tests/issues_tests Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ from ravendb .documents .queries .time_series import TimeSeriesRawResult
2+ from ravendb .infrastructure .entities import User
3+ from ravendb .tests .test_base import TestBase
4+ from ravendb .tools .raven_test_helper import RavenTestHelper
5+
6+
7+ class TestRavenDB15792 (TestBase ):
8+ def setUp (self ):
9+ super ().setUp ()
10+
11+ def test_can_query_time_series_with_spaces_in_name (self ):
12+ document_id = "users/ayende"
13+ base_line = RavenTestHelper .utc_this_month ()
14+
15+ with self .store .open_session () as session :
16+ session .store (User (), document_id )
17+
18+ tsf = session .time_series_for (document_id , "gas m3 usage" )
19+ tsf .append_single (base_line , 1 )
20+
21+ session .save_changes ()
22+
23+ with self .store .open_session () as session :
24+ query = session .advanced .raw_query (
25+ "declare timeseries out()\n " "{\n " ' from "gas m3 usage"\n ' "}\n " "from Users as u\n " "select out()" ,
26+ TimeSeriesRawResult ,
27+ )
28+
29+ result = query .first ()
30+ self .assertIsNotNone (result )
31+
32+ results = result .results
33+
34+ self .assertEqual (1 , len (results ))
You can’t perform that action at this time.
0 commit comments