mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
feat(multiplayer): add shared allocation quota
This commit is contained in:
@@ -6,6 +6,7 @@ import unittest
|
||||
|
||||
SQL = (Path(__file__).parent / "0001_initial.sql").read_text()
|
||||
ASSIGNMENTS_SQL = (Path(__file__).parent / "0002_assignments.sql").read_text()
|
||||
QUOTAS_SQL = (Path(__file__).parent / "0007_allocation_quotas.sql").read_text()
|
||||
|
||||
|
||||
class MigrationTest(unittest.TestCase):
|
||||
@@ -53,6 +54,11 @@ class MigrationTest(unittest.TestCase):
|
||||
):
|
||||
self.assertIn(fragment, ASSIGNMENTS_SQL)
|
||||
|
||||
def test_allocation_quotas_are_optional_and_region_bound(self):
|
||||
for fragment in ("CREATE TABLE allocation_quotas", "region TEXT PRIMARY KEY", "window_seconds", "max_allocations"):
|
||||
self.assertIn(fragment, QUOTAS_SQL)
|
||||
self.assertIn("region IN ('EU', 'NA')", QUOTAS_SQL)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user