607594ae1915 — Oben Sonne 10 years ago
server: exent session tests
1 files changed, 18 insertions(+), 0 deletions(-)

M server/src/tests/test_bongsession.py
M server/src/tests/test_bongsession.py +18 -0
@@ 232,6 232,8 @@ def test_stateupdates():
     s, c = startandconnectserver()
     p = startandconnectbong(s, c, info_shufflemodes=['on', 'off'])
 
+    ### simple state update ###
+
     p.update("""
         playing: true
     """)

          
@@ 294,6 296,8 @@ def test_stateupdates():
           uid: UID2
     """)
 
+    ### progress updates ###
+
     p.update("""
        progress: 10
     """) # this one should get ignored, since the current track has no duration

          
@@ 317,6 321,20 @@ def test_stateupdates():
         - position: 5
     """)
 
+    # this one should get ignored (no change)
+    p.update("""
+        progress: 5
+    """)
+    # other dummy change to check no progress update is sent
+    time.sleep(WAIT_FOR_PLAYER_UPDATE)
+    p.update("""
+        volume: 5
+    """)
+    c.exp("""
+        - updatevolume
+        - level: 5
+    """)
+
     c.disconnect()
     p.stop()
     s.stop()