def test_postgresql_joined_with_db(self): self.is_relation_made.return_value = True with self.assertRaises(Exception) as context: relations.pgsql_db_joined() self.assertEqual(context.exception.message, 'Attempting to associate a postgresql database when' ' there is already associated a mysql one')
def test_postgresql_joined_with_db(self): self.is_relation_made.return_value = True with self.assertRaises(Exception) as context: relations.pgsql_db_joined() self.assertEqual( context.exception.message, 'Attempting to associate a postgresql database when' ' there is already associated a mysql one')
def test_postgresql_db_joined(self): self.is_relation_made.return_value = False relations.pgsql_db_joined() self.relation_set.assert_called_with(database='glance'),
def test_postgresql_db_joined(self): self.unit_get.return_value = 'glance.foohost.com' self.is_relation_made.return_value = False relations.pgsql_db_joined() self.relation_set.assert_called_with(database='glance'),