summaryrefslogtreecommitdiff
path: root/archaeological_context_records/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-07-11 18:57:01 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-07-11 18:57:01 +0200
commit766b4bc5c613675cb38cb57d596a892bea181577 (patch)
treeda1d441ff927841c23a7f88f6bffbd2cccb620da /archaeological_context_records/tests.py
parentc1d0f54193d973f9355e37906ad317c5ed84a8c0 (diff)
downloadIshtar-766b4bc5c613675cb38cb57d596a892bea181577.tar.bz2
Ishtar-766b4bc5c613675cb38cb57d596a892bea181577.zip
Fix graph test
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r--archaeological_context_records/tests.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py
index 496613f86..8fee56c0e 100644
--- a/archaeological_context_records/tests.py
+++ b/archaeological_context_records/tests.py
@@ -962,36 +962,36 @@ class GraphGenerationTest(ContextRecordInit, TestCase):
self.assertIn('"CR 2D"', content)
def test_gen_relation_above(self):
- generate_relation_graph(self.cr_2, render_above=False)
+ generate_relation_graph(self.cr_2, render_below=False)
cr_2 = models.ContextRecord.objects.get(pk=self.cr_2.pk)
self.assertIsNotNone(cr_2.relation_image_above)
self.assertIsNotNone(cr_2.relation_bitmap_image_above)
self.assertIsNotNone(cr_2.relation_dot_above)
content = open(cr_2.relation_dot_above.path).read()
- self.assertIn('"CR 1"', content)
- self.assertIn('"CR 1B"', content)
+ self.assertNotIn('"CR 1"', content)
+ self.assertNotIn('"CR 1B"', content)
self.assertIn('"CR 2B"', content)
self.assertIn('"CR 2",style=filled,fillcolor="#C6C0C0"', content)
- self.assertNotIn('"CR 3B"', content)
- self.assertNotIn('"CR 3"', content)
- self.assertNotIn('"CR 4"', content)
+ self.assertIn('"CR 3"', content)
+ self.assertIn('"CR 3B"', content)
+ self.assertIn('"CR 4"', content)
self.assertNotIn('"CR 2C"', content)
self.assertNotIn('"CR 2D"', content)
def test_gen_relation_below(self):
- generate_relation_graph(self.cr_2, render_below=False)
+ generate_relation_graph(self.cr_2, render_above=False)
cr_2 = models.ContextRecord.objects.get(pk=self.cr_2.pk)
self.assertIsNotNone(cr_2.relation_image_below)
self.assertIsNotNone(cr_2.relation_bitmap_image_below)
self.assertIsNotNone(cr_2.relation_dot_below)
content = open(cr_2.relation_dot_below.path).read()
- self.assertNotIn('"CR 1"', content)
- self.assertNotIn('"CR 1B"', content)
+ self.assertIn('"CR 1"', content)
+ self.assertIn('"CR 1B"', content)
self.assertIn('"CR 2B"', content)
self.assertIn('"CR 2",style=filled,fillcolor="#C6C0C0"', content)
- self.assertIn('"CR 3"', content)
- self.assertIn('"CR 3B"', content)
- self.assertIn('"CR 4"', content)
+ self.assertNotIn('"CR 3B"', content)
+ self.assertNotIn('"CR 3"', content)
+ self.assertNotIn('"CR 4"', content)
self.assertNotIn('"CR 2C"', content)
self.assertNotIn('"CR 2D"', content)