Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coolamqp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
coolamqp
Commits
f2d6acf8
Commit
f2d6acf8
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
artificial coverage
parent
715e6d04
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_clustering/test_things.py
+28
-1
28 additions, 1 deletion
tests/test_clustering/test_things.py
with
28 additions
and
1 deletion
tests/test_clustering/test_things.py
+
28
−
1
View file @
f2d6acf8
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
from
__future__
import
print_function
,
absolute_import
,
division
from
__future__
import
print_function
,
absolute_import
,
division
import
six
import
six
import
unittest
import
unittest
import
time
,
logging
,
threading
,
monotonic
import
time
,
logging
,
threading
,
monotonic
,
warnings
from
coolamqp.objects
import
Message
,
MessageProperties
,
NodeDefinition
,
Queue
,
ReceivedMessage
,
Exchange
from
coolamqp.objects
import
Message
,
MessageProperties
,
NodeDefinition
,
Queue
,
ReceivedMessage
,
Exchange
from
coolamqp.clustering
import
Cluster
,
MessageReceived
,
NothingMuch
from
coolamqp.clustering
import
Cluster
,
MessageReceived
,
NothingMuch
...
@@ -23,3 +23,30 @@ class TestConnecting(unittest.TestCase):
...
@@ -23,3 +23,30 @@ class TestConnecting(unittest.TestCase):
def
test_shutdown_without_start
(
self
):
def
test_shutdown_without_start
(
self
):
c
=
Cluster
([
NODE
])
c
=
Cluster
([
NODE
])
self
.
assertRaises
(
RuntimeError
,
lambda
:
c
.
shutdown
())
self
.
assertRaises
(
RuntimeError
,
lambda
:
c
.
shutdown
())
def
test_exchange_with_unicode_type_warnings
(
self
):
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
warnings
.
simplefilter
(
'
always
'
)
Exchange
(
u
'
lol
'
,
type
=
u
'
wtf
'
)
assert
len
(
w
)
==
1
def
test_queues_equal_and_hashable
(
self
):
q1
=
Queue
(
u
'
lolwut
'
)
q2
=
Queue
(
b
'
lolwut
'
)
q3
=
Queue
(
u
'
not
'
)
self
.
assertEquals
(
q1
,
q2
)
self
.
assertEquals
(
hash
(
q1
),
hash
(
q2
))
self
.
assertNotEqual
(
q1
,
q3
)
def
test_node_with_kwargs
(
self
):
node
=
NodeDefinition
(
host
=
'
127.0.0.1
'
,
user
=
'
guest
'
,
password
=
'
guest
'
)
self
.
assertEquals
(
node
.
virtual_host
,
'
/
'
)
# default
def
test_amqpconnstring_port
(
self
):
node
=
NodeDefinition
(
'
amqp://lol:lol@lol:4123/vhost
'
)
self
.
assertEquals
(
node
.
port
,
4123
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment