-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
# from django.test import TestCase | ||
from uuid import uuid4 | ||
|
||
# Create your tests here. | ||
from django.test import TestCase | ||
|
||
from . import transfers | ||
|
||
|
||
class TransferUtilTests(TestCase): | ||
def test_add_uuid_to_filename(self): | ||
uuid = uuid4() | ||
expected = f'spikes.times.{uuid}.npy' | ||
testable = transfers._add_uuid_to_filename('spikes.times.npy', uuid) | ||
self.assertEqual(expected, testable) | ||
# Check leaves UUID if already added | ||
self.assertEqual(expected, transfers._add_uuid_to_filename(testable, uuid)) |
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